HBase更新操作 [英] HBase update operation

查看:153
本文介绍了HBase更新操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 我是HBase的新手,我在HBase客户端API中发现,更新操作不受支持?是否正确?
  2. 如果是这样,那么为特定rowkey更新值的建议最佳实践是什么?
  1. I am new to HBase, I find in HBase client API, update operation is not supported? Is that correct?
  2. If so, what is the suggested best practices to update the values for a specific rowkey?


推荐答案

您可以使用PUT来创建或更新任何单元格的值。
不要需要使用删除,除非您希望新版本没有一些旧的单元格。

You can use PUT which will create or update the value of any cell. You don't need to use delete unless you want the new version to not have some of the old cells .

假设我们有

say we have

r1:f1:c1:value1
r1:f1:c2:value2 

您可以将r1:f1:c1新值和你会得到:

you can put r1:f1:c1 new value and you'd get:

r1:f1:c1:new value 
r1:f1:c2:value2 

请注意,实际上每个单元格都存储为rowkey,列族,单元格,时间戳,版本和值。因此,根据您设置版本的方式(每列家族),您还可以访问旧值,包括执行时间点查询以查看删除的值。

Note that actually each cell is stored as rowkey, column family, cell, timestamp, version and value. So depending on how you set versioning (per column family) you can also access the old values including doing a point in time query to see deleted values.

这篇关于HBase更新操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆