|
|
-
Hbase Region Split not working with JAVA API
msmdhussain 2012-11-15, 08:42
Hi, I created a table in hbase shell with pre split create 'Test','C',{SPLITS=>['\0x1','\0x2','\0x3','\0x4','\0x5']} when i put a new value using put command in hbase shell the request is passed to the different regions. but, when i put the value in hbase table using java api the request is passed to the first region. can any one help me on this, i need to store the value in different region on basis of the rowkey. Thx, -- View this message in context: http://apache-hbase.679495.n3.nabble.com/Hbase-Region-Split-not-working-with-JAVA-API-tp4034027.htmlSent from the HBase User mailing list archive at Nabble.com.
+
msmdhussain 2012-11-15, 08:42
-
Re: Hbase Region Split not working with JAVA API
Jean-Marc Spaggiari 2012-11-15, 18:43
Can you please share the code you are using to put those values from Java so we can take a look? JM 2012/11/15, msmdhussain <[EMAIL PROTECTED]>: > Hi, > > I created a table in hbase shell with pre split > > create 'Test','C',{SPLITS=>['\0x1','\0x2','\0x3','\0x4','\0x5']} > > when i put a new value using put command in hbase shell the request is > passed to the different regions. > > but, when i put the value in hbase table using java api the request is > passed to the first region. > > can any one help me on this, i need to store the value in different region > on basis of the rowkey. > > Thx, > > > > > > -- > View this message in context: > http://apache-hbase.679495.n3.nabble.com/Hbase-Region-Split-not-working-with-JAVA-API-tp4034027.html> Sent from the HBase User mailing list archive at Nabble.com. >
+
Jean-Marc Spaggiari 2012-11-15, 18:43
-
Re: Hbase Region Split not working with JAVA API
Ameya Kantikar 2012-11-15, 18:55
Here is a sample script to create pre splits. https://github.com/ameyamk/hbaseSampleScripts/blob/master/CreateTable.javaHope this helps. Ameya On Thu, Nov 15, 2012 at 10:43 AM, Jean-Marc Spaggiari < [EMAIL PROTECTED]> wrote: > Can you please share the code you are using to put those values from > Java so we can take a look? > > JM > > 2012/11/15, msmdhussain <[EMAIL PROTECTED]>: > > Hi, > > > > I created a table in hbase shell with pre split > > > > create 'Test','C',{SPLITS=>['\0x1','\0x2','\0x3','\0x4','\0x5']} > > > > when i put a new value using put command in hbase shell the request is > > passed to the different regions. > > > > but, when i put the value in hbase table using java api the request is > > passed to the first region. > > > > can any one help me on this, i need to store the value in different > region > > on basis of the rowkey. > > > > Thx, > > > > > > > > > > > > -- > > View this message in context: > > > http://apache-hbase.679495.n3.nabble.com/Hbase-Region-Split-not-working-with-JAVA-API-tp4034027.html> > Sent from the HBase User mailing list archive at Nabble.com. > > >
+
Ameya Kantikar 2012-11-15, 18:55
-
Hbase Region Split not working with JAVA API
msmdhussain 2012-11-15, 08:43
Hi, I created a table in hbase shell with pre split create 'Test','C',{SPLITS=>['\0x1','\0x2','\0x3','\0x4','\0x5']} when i put a new value using put command in hbase shell the request is passed to the different regions. but, when i put the value in hbase table using java api the request is passed to the first region. can any one help me on this, i need to store the value in different region on basis of the rowkey. Thx, -- View this message in context: http://apache-hbase.679495.n3.nabble.com/Hbase-Region-Split-not-working-with-JAVA-API-tp4034028.htmlSent from the HBase User mailing list archive at Nabble.com.
+
msmdhussain 2012-11-15, 08:43
-
RE: Hbase Region Split not working with JAVA API
Anoop Sam John 2012-11-16, 03:40
Pls give your used command for Put as well as the java code for put. -Anoop- ________________________________________ From: msmdhussain [[EMAIL PROTECTED]] Sent: Thursday, November 15, 2012 2:13 PM To: [EMAIL PROTECTED] Subject: Hbase Region Split not working with JAVA API Hi, I created a table in hbase shell with pre split create 'Test','C',{SPLITS=>['\0x1','\0x2','\0x3','\0x4','\0x5']} when i put a new value using put command in hbase shell the request is passed to the different regions. but, when i put the value in hbase table using java api the request is passed to the first region. can any one help me on this, i need to store the value in different region on basis of the rowkey. Thx, -- View this message in context: http://apache-hbase.679495.n3.nabble.com/Hbase-Region-Split-not-working-with-JAVA-API-tp4034028.htmlSent from the HBase User mailing list archive at Nabble.com.
+
Anoop Sam John 2012-11-16, 03:40
-
RE: Hbase Region Split not working with JAVA API
msmdhussain 2012-11-16, 06:12
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 plz help -- View this message in context: http://apache-hbase.679495.n3.nabble.com/Hbase-Region-Split-not-working-with-JAVA-API-tp4034028p4034076.htmlSent from the HBase User mailing list archive at Nabble.com.
+
msmdhussain 2012-11-16, 06:12
-
Re: Hbase Region Split not working with JAVA API
Stack 2012-11-16, 07:32
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
+
Stack 2012-11-16, 07:32
|
|