Details
-
New Feature
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
None
-
Incompatible change, Reviewed
-
If there is no existing cell in submitting Append/Increment, the custom ts won't be overridden. By contrast, the cell's ts will always be overridden by server.
Description
We don't pass the custom timestamp for Increment, and the increment's timestamp always be rewrite. Hence, user can't increment a cell with custom timestamp.
ProtobufUtil.java
if (values != null && values.size() > 0) { for (Cell cell: values) { valueBuilder.clear(); valueBuilder.setQualifier(UnsafeByteOperations.unsafeWrap( cell.getQualifierArray(), cell.getQualifierOffset(), cell.getQualifierLength())); valueBuilder.setValue(UnsafeByteOperations.unsafeWrap( cell.getValueArray(), cell.getValueOffset(), cell.getValueLength())); if (cell.getTagsLength() > 0) { valueBuilder.setTags(UnsafeByteOperations.unsafeWrap(cell.getTagsArray(), cell.getTagsOffset(), cell.getTagsLength())); } columnBuilder.addQualifierValue(valueBuilder.build()); } }
In contrast to Increment, user can append the cell with custom timestamp. It would be better that make their behavior consistent.
Attachments
Attachments
Issue Links
- blocks
-
HBASE-18519 Use builder pattern to create cell
- Resolved
- is related to
-
HBASE-7141 Cleanup Increment and Append issues
- Closed
- links to