Reputation: 21
I've run samples : SampleUploader,PerformanceEvaluation and rowcount as given in
hadoop wiki: http://wiki.apache.org/hadoop/Hbase/MapReduce
The problem I'm 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........
what is the mistake im making????
thank u a lot sammy
Upvotes: 0
Views: 2302
Reputation: 19666
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.
Upvotes: 4