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 6EF0E990B for ; Tue, 20 Mar 2012 09:05:30 +0000 (UTC) Received: (qmail 70771 invoked by uid 500); 20 Mar 2012 09:05:28 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 70606 invoked by uid 500); 20 Mar 2012 09:05:28 -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 70598 invoked by uid 99); 20 Mar 2012 09:05:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Mar 2012 09:05:28 +0000 X-ASF-Spam-Status: No, hits=1.1 required=5.0 tests=NO_RDNS_DOTCOM_HELO,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 98.139.253.104 is neither permitted nor denied by domain of maysam@yahoo-inc.com) Received: from [98.139.253.104] (HELO mrout1-b.corp.bf1.yahoo.com) (98.139.253.104) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Mar 2012 09:05:23 +0000 Received: from ird-ex07cas03.ds.corp.yahoo.com (ird-ex07cas03-nlb.corp.ird.yahoo.com [77.238.176.90]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id q2K94Lav051537 for ; Tue, 20 Mar 2012 02:04:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1332234261; bh=VHm80fCEaelx8C47L+tITbTabBWcTe6MVUkLCqkOIQY=; h=From:To:Date:Subject:Message-ID:References:In-Reply-To: Content-Type:Content-Transfer-Encoding:MIME-Version; b=guKsZksFRixz6Q0wAJBBoDNU1WNjiQVIIgue8BT4MEpLk6ZAjkhijU3shNnGww8ah rZCKCWH7MdVJ/KqavjSGQaCAqzsxx9XQwYLiqqu+5xzhka542hhwJ+ahaEJQ34pPTG azO/lPs+3AfIhfJR50aK125yVQeUQxW+xkqDCst0= Received: from IRD-EX07VS01.ds.corp.yahoo.com ([77.238.176.68]) by ird-ex07cas03.ds.corp.yahoo.com ([77.238.176.91]) with mapi; Tue, 20 Mar 2012 09:04:21 +0000 From: Maysam Yabandeh To: "user@hbase.apache.org" Date: Tue, 20 Mar 2012 09:04:19 +0000 Subject: Re: Hbase Transactional support Thread-Topic: Hbase Transactional support Thread-Index: Ac0GeG+5nVAz6SO8QZG9iaVHC0f0ZQ== Message-ID: References: <1332178871.62776.ezmlm@hbase.apache.org> <1332179365.15170.156.camel@dkhera-lt> <77883605-1D58-403A-A4D0-008B71A406F2@yahoo-inc.com> <0D0534D89070F347A7ACC0D03FCE696B03DCC3719A@NAMBX02.corp.adobe.com> In-Reply-To: <0D0534D89070F347A7ACC0D03FCE696B03DCC3719A@NAMBX02.corp.adobe.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Sandy, That is an excellent question. Snapshot Isolation is a strong guarantee tha= t is supported by many transactional systems such as Oracle and Google Perc= olator. However, as you correctly pointed out, it is not serializable. We a= ctually have looked into it and implemented a version of Omid that provide= s serializability with a performance comparable to that of snapshot isolati= on. I am currently cleaning the code to make it ready for release on github= . If you are into the details of isolation levels, the core idea is to check = for read-write conflicts instead of write-write conflicts. A paper explaini= ng the details and proving that checking for read-write conflicts alone is = sufficient for serializability is going to be presented in the next Eurosys= conference. "A Critique of Snapshot Isolation", http://eurosys2012.unibe.ch/program/con= ference Cheers - Maysam Yabandeh On Mar 19, 2012, at 8:46 PM, Sandy Pratt wrote: > Maysam, >=20 > I wasn't aware of Omid before this post, so thanks for sharing that. I r= eally like the approach and indeed our own implementation of transactions o= n HBase uses MVCC and optimistic concurrency control with a centralized tra= nsaction manager. I think it's a great fit for HBase. >=20 > One question though. You mention detection of write-write conflicts, but= not write-read conflicts. I'm guessing that this is because you're shoot= ing for non-serializable snapshot isolation. Why not detect write-read ano= malies and get to serializable isolation (or at least closer to it)? For e= xample it seems like you could detect the write skew anomaly (described her= e http://en.wikipedia.org/wiki/Snapshot_isolation) by tracking a little mor= e state in your Status Oracle. Were you trying to reduce state or decentra= lize it or something? Is there simply no need for that level of isolation? >=20 > Apologies if this is clear in the code, which I haven't yet read thorough= ly. >=20 > Thanks, > Sandy >=20 >=20 >> -----Original Message----- >> From: Maysam Yabandeh [mailto:maysam@yahoo-inc.com] >> Sent: Monday, March 19, 2012 11:45 >> To: user@hbase.apache.org >> Subject: Re: Hbase Transactional support >>=20 >> Hi Deepika, >>=20 >> Omid provides Snapshot Isolation (SI), which is a well-known isolation >> guarantee in database systems such as Oracle. In short, each transaction >> reads from a consistent snapshot that does not include partial changes b= y >> concurrent (or failed) transactions. SI also prevents write-write confli= cts >> between concurrent transactions. The overhead of Omid on HBase is >> negligible and does not require any changes into HBase, with the only >> exception of HBase garbage collection algorithm that is replaced via a >> coprocessor. hbase-trx, on the other hand, does not provide read snapsho= ts >> and is not safe with client failures. You can find a more detailed compa= rison in >> the Omid wiki page: >> https://github.com/yahoo/omid/wiki >>=20 >> Cheers >> - Maysam Yabandeh >>=20 >> On Mar 19, 2012, at 6:49 PM, Deepika Khera wrote: >>=20 >>> Hi, >>>=20 >>> I have some map reduce jobs that write to Hbase. I am trying to pick a >>> library that could provide transactional support for Hbase. I looked >>> at Omid and hbase-trx . >>>=20 >>> Could you please provide me with a comparison between the two so I can >>> make the right choice. >>> Are there any other ways to do this? >>>=20 >>> Thanks, >>> Deepika >>>=20 >>>=20 >>>=20 >>>=20 >=20