Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> Cannot create table over REST


Copy link to this message
-
Re: Cannot create table over REST
Hi Karel,

You can check HBase The Definitive Guide, it has a great chapter on the
different clients including Rest.

http://ofps.oreilly.com/titles/9781449396107/clients.html

HTH

Best Regards,
Sonal
Crux: Reporting for HBase <https://github.com/sonalgoyal/crux>
Nube Technologies <http://www.nubetech.co>

<http://in.linkedin.com/in/sonalgoyal>

On Wed, Sep 14, 2011 at 10:03 AM, Karel Minařík <[EMAIL PROTECTED]>wrote:

> Thanks, Andy! I see I've had one more `@` in the column "name" property?
>
> The REST docs are not very clear then -- I've copied over the JSON from
> `GET /table/schema` example (which contains `@name`, not `name` in the
> column definition). I think adding examples for creating tables (and rows,
> for that matter), would be very handy.
>
> Karel
>
> On 14.Sep, 2011, at 1:11 , Andrew Purtell wrote:
>
> > Try
> >
> > curl -v -X PUT \
> >
> >   http://localhost:8080/test/schema \
> >   -H "Accept: application/json" \
> >   -H "Content-Type: application/json" \
> >   -d '{"name":"test","ColumnSchema":[{"name":"data"}]}'
> >
> >
> > You should see:
> >
> >> PUT /test/schema HTTP/1.1
> >> User-Agent: curl/7.21.3 (x86_64-pc-linux-gnu) libcurl/7.21.3
> OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> >> Host: localhost:8080
> >> Accept: application/json
> >> Content-Type: application/json
> >> Content-Length: 48
> >>
> > < HTTP/1.1 201 Created
> > < Location: http://localhost:8085/test/schema
> > < Content-Length: 0
> >
> >
> > Best regards,
> >
> >
> > - Andy
> >
> >
> > Problems worthy of attack prove their worth by hitting back. - Piet Hein
> (via Tom White)
> >
> >
> > ----- Original Message -----
> >> From: Karel Minařík <[EMAIL PROTECTED]>
> >> To: [EMAIL PROTECTED]
> >> Cc:
> >> Sent: Tuesday, September 13, 2011 1:15 PM
> >> Subject: Cannot create table over REST
> >>
> >> Hi,
> >>
> >> when I try to create a table via the REST interface:
> >>
> >> curl -v -X PUT \
> >>   'http://localhost:8080/test/schema' \
> >>   -H "Accept: application/json" \
> >>   -H "Content-Type: application/json" \
> >>   -d
> >> '{"@name":"test","ColumnSchema":[{"@name":"data"}]}'
> >>
> >> I get an exception:
> >>
> >> Sep 13, 2011 10:11:47 PM com.sun.jersey.spi.container.ContainerResponse
> >> mapMappableContainerException
> >> SEVERE: The RuntimeException could not be mapped to a response,
> re-throwing to
> >> the HTTP container
> >> java.lang.NullPointerException
> >>     at org.apache.hadoop.hbase.util.Bytes.toBytes(Bytes.java:401)
> >>
> >> What I'm doing wrong?
> >>
> >> Thanks!,
> >>
> >> Karel
> >>
>
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB