[
https://issues.apache.org/jira/browse/HBASE-19427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16287721#comment-16287721
]
Chia-Ping Tsai commented on HBASE-19427:
----------------------------------------
bq. If we offer a TimeRange that does not include the last Append, then the
Append will start over overwriting what was there previous?
bq. so if timerange does not include last increment, the increment starts over?
An new cell will be added. The one diff between Append and Increment is that
the zero value of cell in append will reset the corresponding cell but
increment doesn't. I had left the comment for this diff when resolving
HBASE-18546.
{code}
case INCREMENT:
mutationType = MutationType.INCREMENT;
// If delta amount to apply is 0, don't write WAL or MemStore.
long deltaAmount = getLongValue(delta);
// TODO: Does zero value mean reset Cell? For example, the ttl.
apply = deltaAmount != 0;
final long newValue = currentValue == null ? deltaAmount :
getLongValue(currentValue) + deltaAmount;
newCell = reckonDelta(delta, currentValue, columnFamily, now,
mutation, (oldCell) -> Bytes.toBytes(newValue));
break;
{code}
bq. Should we have this same facility in Increment and CheckAndMutate?
Yep, we can support the TimeRange for checkAndMutate. FYI [~psomogyi] (You do
the great job for checkAndMutate in HBASE-19213)
> Add TimeRange support into Append to optimize for counters
> ----------------------------------------------------------
>
> Key: HBASE-19427
> URL: https://issues.apache.org/jira/browse/HBASE-19427
> Project: HBase
> Issue Type: Sub-task
> Reporter: Chia-Ping Tsai
> Assignee: Chia-Ping Tsai
> Fix For: 2.0.0-beta-1
>
> Attachments: HBASE-19427.v0.patch, HBASE-19427.v1.patch
>
>
> The time range in Increment is used to optimize the Get operation. This issue
> try to port the feature from Increment to Append.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)