From user-return-44361-apmail-hbase-user-archive=hbase.apache.org@hbase.apache.org Fri Jul 25 17:50:29 2014 Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D42AE106D6 for ; Fri, 25 Jul 2014 17:50:29 +0000 (UTC) Received: (qmail 26058 invoked by uid 500); 25 Jul 2014 17:50:27 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 25988 invoked by uid 500); 25 Jul 2014 17:50:27 -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 25931 invoked by uid 99); 25 Jul 2014 17:50:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jul 2014 17:50:27 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mail2mingtao@gmail.com designates 209.85.219.44 as permitted sender) Received: from [209.85.219.44] (HELO mail-oa0-f44.google.com) (209.85.219.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jul 2014 17:50:20 +0000 Received: by mail-oa0-f44.google.com with SMTP id eb12so5953103oac.17 for ; Fri, 25 Jul 2014 10:49:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=SnVrwLMhzEhIdqYxgc5YRH6GunnXjqhQJZRD4pQ8OyA=; b=E38DLRUjjqezq9aDIJ4GwiltY+Ux6DUouf9Vgfhy2D+KPCQ7I7LLQGQNE+UveN0CSj DoVx6tLqztz1s2WjChmsfxJYoO1KXZQKE49xx5LkDklJE12edv0xXNT5Xn++4hyjmtqH +uCNdgJqHKv7EzGuIX2+V1oS8SUFIeR5DFSybz7ItML0helkx/tM0zIHbrDtoXdRv0CL keaXU5ri48CfenoJEgff+gPrMFth0XByGCnHFwXExlkeHtHyb3RKtXlaDoMPfmRfYpjR mmjfDJoxyagnyYtd7B/Cn/tjf9ydVFmdDiAbN2bm/b16tM94gLbzsQjBUPmMCVkMfm+u imCQ== X-Received: by 10.60.84.207 with SMTP id b15mr24448293oez.49.1406310599531; Fri, 25 Jul 2014 10:49:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.10.68 with HTTP; Fri, 25 Jul 2014 10:49:39 -0700 (PDT) From: Mingtao Zhang Date: Fri, 25 Jul 2014 13:49:39 -0400 Message-ID: Subject: Consistency Model To: "user@hbase.apache.org" Content-Type: multipart/alternative; boundary=089e0118489ebaa0f704ff0833be X-Virus-Checked: Checked by ClamAV on apache.org --089e0118489ebaa0f704ff0833be Content-Type: text/plain; charset=UTF-8 Hi, I have the following row key and value (column family/column qualifier ignored): hash(sitename) + sessionid value: duration I need to calculate the duration in a distributed environment correctly. As far as I know, I need to lock the specific row during read-write (in my case my read is only happen before the write) to ensure consistency. Previously from the HBase Definitive Guide or 0.94.15, I could see (though deprecated) RowLock lockRow(byte[] row) throws IOException; void unlockRow(RowLock rl) throws IOException; But it's seems gone with the latest API. https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/HTableInterface.html Is there anyway I could achieve the consistency with latest HBase? Best Regards, Mingtao --089e0118489ebaa0f704ff0833be--