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 >> Hbase Region Split not working with JAVA API


Copy link to this message
-
Re: Hbase Region Split not working with JAVA API
On Thu, Nov 15, 2012 at 10:12 PM, msmdhussain <[EMAIL PROTECTED]> wrote:
>
> i tried using the follwing command in hbase shell
>
>>> put
>>> 'Test','\x03\x00\x00\x00\x0A\x00\x00\x01:K\xF0\xC0@IN\x00\x00AS*******','C:input','25'
>
> but, row key length is 292 bytes its a composite key combination of
> time_seg+date+country_id+****+metrics_id (15 fields)
>
> it is stored in the correct region '\x03'
>
> and im converting all the above field values into  byte in java program and
> using the Put java api to insert the value to the hbase
>
> but, it get stored in the first region '\x01'
>
> i dont know why its happening when using java api
Your translation of region name must be incorrect.  It can be tricky
going from the String representation to the raw bytes.

Can you do something like figure out its ordinal position in .META.
then scan .META.  The rows in .META. are regionnames.  You can take
the Nth row in the .META. and use its bytes as the region name doing
your manipulations?

St.Ack
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