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 13AE4200D6D for ; Tue, 19 Dec 2017 05:17:19 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 1234A160C29; Tue, 19 Dec 2017 04:17:19 +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 5B5F3160C05 for ; Tue, 19 Dec 2017 05:17:18 +0100 (CET) Received: (qmail 5932 invoked by uid 500); 19 Dec 2017 04:17:16 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 5921 invoked by uid 99); 19 Dec 2017 04:17:16 -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, 19 Dec 2017 04:17:16 +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 0B45B1A05C6 for ; Tue, 19 Dec 2017 04:17:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1 X-Spam-Level: * X-Spam-Status: No, score=1 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id OvdCgU_NG-ON for ; Tue, 19 Dec 2017 04:17:13 +0000 (UTC) Received: from mail.binarymatter.com (binarymatter.com [178.79.135.15]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 56F975F297 for ; Tue, 19 Dec 2017 04:17:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.binarymatter.com (Postfix) with ESMTP id 56F317423C for ; Tue, 19 Dec 2017 04:17:08 +0000 (UTC) Received: from mail.binarymatter.com ([127.0.0.1]) by localhost (mail.binarymatter.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id vTlOo3TGAMqJ for ; Tue, 19 Dec 2017 04:17:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.binarymatter.com (Postfix) with ESMTP id 4B7F57423E for ; Tue, 19 Dec 2017 04:17:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.binarymatter.com Received: from mail.binarymatter.com ([127.0.0.1]) by localhost (mail.binarymatter.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 2rkZ8t9Dc5zh for ; Tue, 19 Dec 2017 04:17:07 +0000 (UTC) Received: from [10.1.8.91] (d173-180-135-149.bchsia.telus.net [173.180.135.149]) by mail.binarymatter.com (Postfix) with ESMTPSA id 0B2527423C for ; Tue, 19 Dec 2017 04:17:07 +0000 (UTC) From: Alex Loffler Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Date: Mon, 18 Dec 2017 20:17:04 -0800 Subject: Re: HBase increment of a specific cell version Message-Id: <2BECF98B-18CB-4403-BEFD-4692DE6C6864@loffler.org> References: In-Reply-To: To: user@hbase.apache.org X-Mailer: iPad Mail (15B202) archived-at: Tue, 19 Dec 2017 04:17:19 -0000 Hi Stack, Thanks for the response, I am trying to maintain an hourly count of messages= between two keys/entities: Sender->recipient E.g. a->b There are multiple ways of modelling this, but one that seems to fit nicely i= s: Row key =3D a Col =3D b Timestamp/version=3D e.g hour-of-day or hour-of-epoch Val =3D count of messages This approach utilizes the three dimensions of rowkey, col & version nicely.= I will never need to look messages up by recipient but will be frequently qu= erying for all recipients contacted by a sender (ie. return the value(count)= for each column (recipient) for a specific rowkey (sender) during a particu= lar timespan - ie. at version x) Everything is in place for this to work except the ability to increment a sp= ecific version of a cell per the above. If I don=E2=80=99t keep count (increment) and just write a flag to represent= a message between the two, this scheme/approach scales really nicely with t= he put version of addColumn If there=E2=80=99s a better pattern/approach, I=E2=80=99d really appreciate a= pointer in the right direction -Alex. > On Dec 18, 2017, at 8:49 AM, Stack wrote: >=20 > Hello Alex. We don't have such an ability. Can you say what the use case i= s > because I at least am having trouble understanding why you would want to d= o > such a thing. >=20 > Thank you, > S >=20 >> On Wed, Dec 13, 2017 at 2:07 PM, Alex Loffler wrote: >>=20 >> Hi Folks, >>=20 >> I am using the HBase=E2=80=99s timestamp/version concept to track >> aggregates/counts for time periods/spans. >>=20 >> The put function allows me to update a specific version, ie. >> put(rk).addColumn(cf, column, version, value) >>=20 >> But I can=E2=80=99t find a way of incrementing a specific version ie. >> increment(rk).addColumn(cf, column, version, value) doesn=E2=80=99t exist= . >>=20 >> I can only find increment(rk).addColumn(cf, column, value) which exhibits= >> the default behaviour of taking the latest version of the cell, >> incrementing it=E2=80=99s value and updating the timestamp/version with >> current-timestamp-millis. >>=20 >> What I=E2=80=99d really like is an increment to the value in the specifie= d >> cell/version without the version update. >>=20 >> Am I missing something, is this not possible for some reason in not >> getting, or would it be a good feature request? >>=20 >> Thanks again for a fantastic platform! >> -Alex. >>=20 >>=20 >>=20 >>=20 >>=20