尝试更新列值时,带有时间戳的 Hbase 放置失败
Hbase put with timestamp fails when trying to update column value
我正在使用 put 在 hbase 中创建一行,如下所示:
Put put = new Put(Bytes.toBytes(rowKey));
put.add(Bytes.toBytes(columnFamily), Bytes.toBytes(qualifier), cellTimestamp, value);
这些 put 被批处理,然后添加到 hbase 中:
table.setAutoFlushTo(true);
table.put(batch);
table.flushCommits();
这适用于新行。如果我随后尝试更新列值并指定新的 cellTimestamp,则数据不会更新。这可能吗? hbase table 是使用 VERSIONS => '1' 创建的。
提前致谢!
通常不鼓励提供 cellTimestamp,但如果您需要它,请确保 cellTimestamp...
- ... 比以前的版本大
- ...以毫秒为单位
这里有一些关于版本控制和 HBase 如何处理时间戳的好读物:
我正在使用 put 在 hbase 中创建一行,如下所示:
Put put = new Put(Bytes.toBytes(rowKey));
put.add(Bytes.toBytes(columnFamily), Bytes.toBytes(qualifier), cellTimestamp, value);
这些 put 被批处理,然后添加到 hbase 中:
table.setAutoFlushTo(true);
table.put(batch);
table.flushCommits();
这适用于新行。如果我随后尝试更新列值并指定新的 cellTimestamp,则数据不会更新。这可能吗? hbase table 是使用 VERSIONS => '1' 创建的。
提前致谢!
通常不鼓励提供 cellTimestamp,但如果您需要它,请确保 cellTimestamp...
- ... 比以前的版本大
- ...以毫秒为单位
这里有一些关于版本控制和 HBase 如何处理时间戳的好读物: