[ 
https://issues.apache.org/jira/browse/HBASE-18546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16120967#comment-16120967
 ] 

Chia-Ping Tsai commented on HBASE-18546:
----------------------------------------

bq.  IIRC the server side implementation will not take care about the timestamp.
The custom timestamp will be adopted if server doesn't find the related cell. 
As i see it, it is more like a bug.
{code}
      CellUtil.updateLatestStamp(delta, now);   // the custom timestamp won't 
be rewrited
      newCell = delta;
      tags = TagUtil.carryForwardTTLTag(tags, mutation.getTTL());
      if (tags != null) {
        newCell = CellUtil.createCell(delta, tags);
      }
{code}
bq. I think this should be a new feature?
We allow user to use custom timestamp for PUT/DELETE/APPEND. Ya, this should be 
an new feature even if there is no use case at present.

> Append/Increment a cell with custom timestamp
> ---------------------------------------------
>
>                 Key: HBASE-18546
>                 URL: https://issues.apache.org/jira/browse/HBASE-18546
>             Project: HBase
>          Issue Type: Bug
>          Components: API, Client
>            Reporter: Chia-Ping Tsai
>            Assignee: Chia-Ping Tsai
>            Priority: Critical
>              Labels: incompatibleChange
>             Fix For: 3.0.0, 2.0.0-alpha-2
>
>
> 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.
> {code:title=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());
>         }
>       }
> {code}
> In contrast to Increment, user can append the cell with custom timestamp. It 
> would be better that make their behavior consistent. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to