0
votes

I have the output from the mapreduce looks like this as key value paris having thousand of records

    aa      abraham azad
    aa      anand agarwal
    aa      ajinke arun
    aa      ajith agarwal
    bb      balu bhaskar
    bb      budde bheema
    bb      banasankari balu 

I want to load these records into hbase in such a way that if want to process aa key it should process all the keys having aa.

1
Can you please elaborate your problem? What do you mean by process here? Looking at your data sample , you can use aa as row key in hbase and its values as column value. - Shashi
I want to have aa, bb as row keys which are unique in hbase ,if we try to update , it will go into different versions. - G Krishna Sampath
Correct. For a unique key 'aa' with multiple values, it will have values. So version is not sufficient for you? Or you have some different requirement? - Shashi

1 Answers

0
votes

I assume you want a solution for your table design, not the code.

Since Hbase column names can be different for each row, you can use aa,bb,cc as row key and each name as a column name.

Take a look at this article, it solves similar problem of following using different table design and compared them.

Also, for the code to put this data into your table, you can use any of the methods explained here based on your case. (I guess a simple Java code can do it for you.)