0
votes

Thanks for taking interest in my question. Before I begin, I'd like to let you know that I'm very new to Hadoop & HBase. So far, I find Hadoop very interesting and would like to contribute more in the future.

I'm primarily interested in improving performance of HBase. To do so,I had created one hbase table , and have written pig script for the loading 5000(only values delimited by '!' ) lines of data into hbase table and later i mapped this h base table with Hive table . every thing is working fine as of now ... But the problem comes now is i want to load the data which has key and value both (for example key1 =12 ! key2= 13) , so for that what kind of parsing i can choose to load that key-value pair data into h base tables accordingly , and also please let me know the importance of the row key in h base table .

And i had written the Pig script as follows

A = LOAD '/BULK_ARK_DATA/' USING PigStorage( '!' ) AS(id: chararray,a: chararray,b: chararray,c: chararray); STORE A INTO 'hbase://bulk_ark' USING org.apache.pig.backend.hadoop.hbase.HBaseStorage ( 'AF:a AF:b AF:c');

So how to Load the key-valued data in hbase tables ?????? Please respond me As early as u get this .... :)

1

1 Answers

0
votes

Hbase is actually a key-value datastore(a map at its core). You don't have to do anything special, but think well about your table schema. For your particular case, how about having the first part of you datum as the key and the second part as value. Something like "cf:key1=>12"