Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A310F200D56 for ; Tue, 12 Dec 2017 16:05:13 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A151F160BFC; Tue, 12 Dec 2017 15:05:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E77C2160BE7 for ; Tue, 12 Dec 2017 16:05:12 +0100 (CET) Received: (qmail 48523 invoked by uid 500); 12 Dec 2017 15:05:12 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 48512 invoked by uid 99); 12 Dec 2017 15:05:12 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Dec 2017 15:05:12 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 6A5A01A0EBF for ; Tue, 12 Dec 2017 15:05:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id EiImoz29TkA5 for ; Tue, 12 Dec 2017 15:05:10 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 537945F263 for ; Tue, 12 Dec 2017 15:05:10 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7F6B3E0F30 for ; Tue, 12 Dec 2017 15:05:07 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id DB7FB212FE for ; Tue, 12 Dec 2017 15:05:03 +0000 (UTC) Date: Tue, 12 Dec 2017 15:05:03 +0000 (UTC) From: "Chia-Ping Tsai (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-19427) Add TimeRange support into Append to optimize for counters MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 12 Dec 2017 15:05:13 -0000 [ 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)