更新 hbase 中的行时遇到问题
我已经运行了示例:SampleUploader、PerformanceEvaluation 和 rowcount,如
hadoop wiki 中给出的: http://wiki .apache.org/hadoop/Hbase/MapReduce
我面临的问题是:table1是我的表,其中包含列族列
>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
我希望这两列作为不同版本出现在同一行中 相似, 如果我将名称列更改为 sarah,它会显示更新的行......但我希望旧行和更改后的行都显示为 2 个不同的版本,以便我可以对数据进行分析...... ..
我犯了什么错误???
非常感谢你 萨米
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要查看同一行的多个版本,您需要指定 VERSIONS 选项:
当 hbase shell 打印出
That's a single row with multiple columns 时。文本表示恰好使用多行文本,每列一行。
To see multiple versions of the same row, you need to specify a VERSIONS option:
When the hbase shell prints out
That's a single row with multiple columns. The text representation just happens to use multiple lines of text, one per column.