Hi
i want to get all column qualifiers and  corresponding cell values for the
Rowkey
for example below is table structure

hbase(main):002:0> scan "people"
ROW
COLUMN+CELL
 [email protected]   column=colmn_fam:[email protected],
timestamp=14160315498
                      33,
value=1
 [email protected]    column=colmn_fam:[email protected],
timestamp=141590081652
                      2,
value=\x00\x00\x00\x01
 [email protected]         column=colmn_fam:[email protected],
timestamp=1415900817028, va

lue=\x00\x00\x00\x01
 [email protected]     column=colmn_fam:[email protected],
timestamp=1416031549845
                      ,
value=1
 [email protected]      column=colmn_fam:[email protected],
timestamp=1415900817017,

value=\x00\x00\x00\x01
 [email protected]   column=colmn_fam:[email protected],
timestamp=14160315498
                      40,
value=1
 [email protected]      column=colmn_fam:[email protected],
timestamp=1416148432981,

value=1
 [email protected]       column=colmn_fam:[email protected],
timestamp=1416031549850,

value=1
 [email protected]        column=colmn_fam:[email protected],
timestamp=1416722434614, v

alue=1
 [email protected]       column=colmn_fam:[email protected],
timestamp=1415900817022,

value=\x00\x00\x00\x01
 [email protected]        column=colmn_fam:[email protected],
timestamp=1415900817035, v
                      alue=\x00\x00\x00\x01

for key =>[email protected] i have to get  all columnqualifiers in
"colmn_fam" column family

so what is the way to get that?i tried below samples but i didnt get  what
i expect..please suggest the best way to get that

here i tried some methods


Get get_colums=new Get(ROWKEY);

Result result_of_coumns=testTable.get(get_colums);


    Map    <byte[],byte[]>
family=result_of_coumns.getFamilyMap(colmnfamily);

    for (Map.Entry<byte[],byte[]> entry:family.entrySet())
    {
        System.out.println(entry.getKey());
        System.out.println(entry.getValue());
    }


O/P

[B@35e023f0
[B@e577d32


LiST METHOD


List <String> mail_list = new ArrayList<String>();

Result result_of_coumns=testTable.get(get_colums);

for(Byte kv:result_of_coumns.getRow())
    {
System.out.println(kv.toString());
mail_list.add(kv.toString());

    }

for(String temp:mail_list)
    {
        System.out.println(temp.toString());
    }



 O/P

97
121
121
111
64
103
109
97
105
108
46
99
111
109

Thanks
Beesh

Reply via email to