Return-Path: X-Original-To: apmail-accumulo-user-archive@www.apache.org Delivered-To: apmail-accumulo-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 3CAC6D89D for ; Tue, 16 Oct 2012 22:19:38 +0000 (UTC) Received: (qmail 34786 invoked by uid 500); 16 Oct 2012 22:19:38 -0000 Delivered-To: apmail-accumulo-user-archive@accumulo.apache.org Received: (qmail 34725 invoked by uid 500); 16 Oct 2012 22:19:38 -0000 Mailing-List: contact user-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@accumulo.apache.org Delivered-To: mailing list user@accumulo.apache.org Received: (qmail 34717 invoked by uid 99); 16 Oct 2012 22:19:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Oct 2012 22:19:38 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of eric.newton@gmail.com designates 209.85.223.169 as permitted sender) Received: from [209.85.223.169] (HELO mail-ie0-f169.google.com) (209.85.223.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Oct 2012 22:19:32 +0000 Received: by mail-ie0-f169.google.com with SMTP id 10so13404770ied.0 for ; Tue, 16 Oct 2012 15:19:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=bC6SE7on/598YH/X83eG8Wbzrf0TVq0JRW6DJP32+a0=; b=hK+vIwVjBLGZlBnNQqa6uFPJZ7fedWpAIv2HKhVEivOFtA7i2sqE1eYS83ldWvdo3l W4Qx5VZHVwtTcQiCyKyuofoTo5Lm3hTnACJPABKzvU0vyBb3DfZ94uCpXWbNuZt56nXU V+IdDV2zecMnKRq/C6MVIpO9yopQpy9T42piOhLEVWmzFKr7P1luVzOLvyggSNVuqHCa gkKebIx84Sp86zEumWq8kxklQEdJ5XN6PAR28SSNlOdoy/3HdLnkSQ4NqX8BobVJyV4g 2HgXtp7PJmKjH3A9x0m/n1YtR0Lyi21FcPnsSu8vgE7Zfhh/kaBATDsg5BOL3ZxecCMl 5nmg== MIME-Version: 1.0 Received: by 10.50.33.174 with SMTP id s14mr13609084igi.11.1350425952228; Tue, 16 Oct 2012 15:19:12 -0700 (PDT) Received: by 10.50.66.72 with HTTP; Tue, 16 Oct 2012 15:19:12 -0700 (PDT) In-Reply-To: <8981F843EE8088488986AB76F63A790313E02090@endeavour.eoir.com> References: <8981F843EE8088488986AB76F63A790313E02090@endeavour.eoir.com> Date: Tue, 16 Oct 2012 18:19:12 -0400 Message-ID: Subject: Re: Concurrent updates From: Eric Newton To: user@accumulo.apache.org Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Accumulo does not have locks, nor does it have transactions. It does support atomic, isolated updates within a row. Accumulo also supports a very specific kind of update which is very helpful in the case of sums and aggregates. For example, if I wanted to provide a "count" I can insert: row X, column A, value 1: (X, A, 1) to indicate some event occurred. Eventually, in the database, there will be lots of these values at a row/column: (X, A, 1) (X, A, 1) (X, A, 1) You can insert code to reduce these values when you scan, kind of like a Combiner in a map/reduce job. This code will emit: (X, A, 3) The same code can also be incorporated into the compaction scheme, so eventually, the database will actually store: (X, A, 3) This mechanism can be used to "sum" more complex information. The point is that you can take advantage of the log-structured merge tree to defer the computation to some point in the future when you have a very high degree of isolation. Yet you can still perform the computation as-needed right after you add insert information. Of course, it does not provide a substitute for locks or transactions and may not cover your use case. But it covers a surprising number of them. -Eric On Tue, Oct 16, 2012 at 4:51 PM, Sami Omer wrote: > Hello everyone, > > > > I=92m using Accumulo 1.3.6 as the backend for a project that I=92ve been = working > on, I=92m relatively new to it. > > > > I have written a client that appends some of the data stored in my Accumu= lo > backend. Now, if I have multiple clients running and they perform the > read/update operation simultaneously I might run into concurrency problem= s. > So, I was wondering what could be done to prevent such race conditions. D= oes > Accumulo have an equivalent to RDBMS=92s transactions? Or is there a way = to > lock rows that are currently being processed for read/update? Do you have > any other ways to solve the issue of concurrent updates? > > > > Your help is greatly appreciated. > > > > Sami