[英]Hbase put with timestamp fails when trying to update column value
I'm creating a row in hbase using a put as follows: 我正在使用put在hbase中创建一行,如下所示:
Put put = new Put(Bytes.toBytes(rowKey));
put.add(Bytes.toBytes(columnFamily), Bytes.toBytes(qualifier), cellTimestamp, value);
These puts get batched and then added to hbase as: 将这些put批处理,然后按以下方式添加到hbase中:
table.setAutoFlushTo(true);
table.put(batch);
table.flushCommits();
This works for new rows. 这适用于新行。 If I then try and update the column value and specify a new cellTimestamp, the data does not get updated.
如果随后尝试更新列值并指定新的cellTimestamp,则数据不会更新。 Is this possible?
这可能吗? The hbase table is created with VERSIONS => '1'.
hbase表是使用VERSIONS =>'1'创建的。
Thanks in advnace! 提前感谢!
It's generally discouraged to provide the cellTimestamp, but in case you need it please make sure that cellTimestamp... 通常不建议提供cellTimestamp,但如果需要,请确保提供cellTimestamp ...
Here are some nice readings about versioning & how HBase handles timestamps: 以下是有关版本控制以及HBase如何处理时间戳的一些不错的读物:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.