tags:

views:

70

answers:

1

Hello i've just started exploring hbase

i've run samples : SampleUploader,PerformanceEvaluation and rowcount as given in

hadoop wiki: http://wiki.apache.org/hadoop/Hbase/MapReduce

The problem im facing is : table1 is my table with the column family column

create 'table1','column'

put 'table1','row1','column:address','SanFrancisco'

hbase(main):020:0> scan 'table1' ROW COLUMN+CELL
row1 column=column:address, timestamp=1276351974560, value=SanFrancisco

put 'table1','row1','column:name','Hannah'

hbase(main):020:0> scan 'table1'

ROW COLUMN+CELL

row1 column=column:address,timestamp=1276351974560,value=SanFrancisco

row1 column=column:name, timestamp=1276351899573, value=Hannah

i want both the columns to appear in the same row as a different version

similary, if i change the name column to sarah, it shows the updated row.... but i want both the old row and the changed row to appear as 2 different versions so that i could make analysis on the data........

whatis the mistake im making????

thank u a lot sammy

+2  A: 

To see multiple versions of the same row, you need to specify a VERSIONS option:

get 'my_table', 'my_row_key', {VERSIONS -> 4}

When the hbase shell prints out

row1 column=column:address,timestamp=1276351974560,value=SanFrancisco
row1 column=column:name, timestamp=1276351899573, value=Hannah 

That's a single row with multiple columns. The text representation just happens to use multiple lines of text, one per column.

SquareCog
Thank u a lot :)) it worked this way : scan 'my_table',{VERSIONS -> 4}
sammy