Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase, mail # user - REST API Table Create ColumnSchema Ignored


Copy link to this message
-
Re: REST API Table Create ColumnSchema Ignored
Andrew Purtell 2013-03-03, 05:23
Try using the XML representation.

On Sunday, March 3, 2013, Ben Myles wrote:

> Nothing in the log related to the request. The request seems to be
> processed fine, just those extra schema attributes are ignored. It even
> creates the column family (meaning it's picking up the 'name' key) but just
> with default options.
>
>
> On Sat, Mar 2, 2013 at 5:07 PM, Ted Yu <[EMAIL PROTECTED] <javascript:;>>
> wrote:
>
> > Can you check the server log around the time you issued the PUT command ?
> >
> > I am not familiar with REST. But are the square brackets required ?
> >
> > Cheers
> >
> > On Sat, Mar 2, 2013 at 4:36 PM, Ben Myles <[EMAIL PROTECTED]<javascript:;>>
> wrote:
> >
> > > Trying to create a table using the REST API. Here's my curl request:
> > >
> > > curl -v -X PUT \
> > >   'http://cdh45:20550/curltest/schema' \
> > >   -H "Accept: application/json" \
> > >   -H "Content-Type: application/json" \
> > >   -d '{"name":"curltest","ColumnSchema":[{"name":"data", "COMPRESSION":
> > > "GZ"}]}'
> > >
> > > This creates the table 'curliest' with the column family 'data'.
> Problem
> > > is, it doesn't set COMPRESSION (or any other options I pass):
> > >
> > > hbase(main):020:0> describe 'curltest'
> > > DESCRIPTION
> > >                                                       ENABLED
> > >
> > >  {NAME => 'curltest', FAMILIES => [{NAME => 'data', DATA_BLOCK_ENCODING
> > =>
> > > 'NONE', BLOOMFILTER => 'NONE', REPLICATION_SCOPE => '0 true
> > >
> > >  ', VERSIONS => '3', COMPRESSION => 'NONE', MIN_VERSIONS => '0', TTL =>
> > > '2147483647', KEEP_DELETED_CELLS => 'false', BLOCKSIZE =>
> > >
> > >   '65536', IN_MEMORY => 'false', ENCODE_ON_DISK => 'true', BLOCKCACHE
> =>
> > > 'true'}]}
> > >
> > >
> > > Am I just formatting this wrong, or is this a known bug?
> > >
> > > HBase version: 0.94.2-cdh4.2.0
> > >
> > > Thanks!
> > >
> >
>
--
Best regards,

   - Andy

Problems worthy of attack prove their worth by hitting back. - Piet Hein
(via Tom White)