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 797B410303 for ; Sat, 20 Apr 2013 07:17:29 +0000 (UTC) Received: (qmail 31478 invoked by uid 500); 20 Apr 2013 07:17:27 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 31111 invoked by uid 500); 20 Apr 2013 07:17:26 -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 31090 invoked by uid 99); 20 Apr 2013 07:17:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Apr 2013 07:17:26 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of stoffe@gmail.com designates 209.85.192.181 as permitted sender) Received: from [209.85.192.181] (HELO mail-pd0-f181.google.com) (209.85.192.181) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Apr 2013 07:17:21 +0000 Received: by mail-pd0-f181.google.com with SMTP id y10so2595468pdj.40 for ; Sat, 20 Apr 2013 00:17:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=FpUvGdjcAWQ3GimGbVrhmW01ZYVTNd94aqYW1nSsRzQ=; b=SZR3uE33avz+Ha9nPwOHRX7pXNf0Y8EwYEMm+U69G8tiSQlHLNqOzXHHH0TkdOXu2s cG1khg/7gUTDyaLgyqBaiWUU7e0pHNx5UHXtQn14jLYpCFLOkFozw73K5Ag5DRCnGqwv xjInliaJHmEWwhk/JHEFcB7grUoguQeKb6ipTfzwsnu+CRHkN7AQ3zsgTL6wyoltEmal LlGPvH4gYox0DVPGq2GbUXMPsv0GwZELiLYj8ePeLKPcDVPzcPQwasB0qX+gE55OOYMS BMUKs8puIxZWEWEXl+CiE40eGU5X6tAyskkMlz+3TIjzFzrbP/a7j9dj9BBrJKf/sm4G GijA== MIME-Version: 1.0 X-Received: by 10.66.52.76 with SMTP id r12mr2904306pao.217.1366442221339; Sat, 20 Apr 2013 00:17:01 -0700 (PDT) Received: by 10.67.5.134 with HTTP; Sat, 20 Apr 2013 00:17:01 -0700 (PDT) In-Reply-To: References: Date: Sat, 20 Apr 2013 09:17:01 +0200 Message-ID: Subject: Re: Overwrite a row From: =?ISO-8859-1?Q?Kristoffer_Sj=F6gren?= To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=bcaec5431b80358c2b04dac59f4b X-Virus-Checked: Checked by ClamAV on apache.org --bcaec5431b80358c2b04dac59f4b Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable The schema is known beforehand so this is exactly what I need. Great! One more question. What guarantees does the batch operation have? Are the operations contained within each batch atomic? I.e. all mutations will be given the same timestamp? If something fails, all operation fail or can it fail partially? Thanks for your help, much appreciated. Cheers, -Kristoffer On Sat, Apr 20, 2013 at 4:47 AM, Ted Yu wrote: > I don't know details about Kristoffer's schema. > If all the column qualifiers are known a priori, mutateRow() should serve > his needs. > > HBase allows arbitrary number of columns in a column family. If the schem= a > is dynamic, mutateRow() wouldn't suffice. > If the column qualifiers are known but the row is very wide (and a few > columns are updated per call), performance would degrade. > > Just some factors to consider. > > Cheers > > On Fri, Apr 19, 2013 at 1:41 PM, Mohamed Ibrahim >wrote: > > > Actually I do see it in the 0.94 JavaDocs ( > > > > > http://hbase.apache.org/0.94/apidocs/org/apache/hadoop/hbase/client/HTabl= e.html#mutateRow(org.apache.hadoop.hbase.client.RowMutations) > > ), > > so may be it was added in 0.94.6 even though the jira says fixed in 0.9= 5 > . > > I haven't used it though, but it seems that's what you're looking for. > > > > Sorry for confusion. > > > > Mohamed > > > > > > On Fri, Apr 19, 2013 at 4:35 PM, Mohamed Ibrahim > >wrote: > > > > > It seems that 0.95 is not released yet, mutateRow won't be a solution > for > > > now. I saw it in the downloads and I thought it was released. > > > > > > > > > On Fri, Apr 19, 2013 at 4:18 PM, Mohamed Ibrahim < > mibrahim@mibrahim.net > > >wrote: > > > > > >> Just noticed you want to delete as well. I think that's supported > since > > >> 0.95 in mutateRow ( > > >> > > > http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/HTable.htm= l#mutateRow(org.apache.hadoop.hbase.client.RowMutations) > ). > > >> You can do multiple puts and deletes and they will be performed > > atomically. > > >> So you can remove qualifiers and put new ones. > > >> > > >> Mohamed > > >> > > >> > > >> On Fri, Apr 19, 2013 at 3:44 PM, Kristoffer Sj=F6gren > >wrote: > > >> > > >>> What would you suggest? I want the operation to be atomic. > > >>> > > >>> > > >>> On Fri, Apr 19, 2013 at 8:32 PM, Ted Yu wrote= : > > >>> > > >>> > What is the maximum number of versions do you allow for the > > underlying > > >>> > table ? > > >>> > > > >>> > Thanks > > >>> > > > >>> > On Fri, Apr 19, 2013 at 10:53 AM, Kristoffer Sj=F6gren < > > stoffe@gmail.com > > >>> > >wrote: > > >>> > > > >>> > > Hi > > >>> > > > > >>> > > Is it possible to completely overwrite/replace a row in a singl= e > > >>> _atomic_ > > >>> > > action? Already existing columns and qualifiers should be remov= ed > > if > > >>> they > > >>> > > do not exist in the data inserted into the row. > > >>> > > > > >>> > > The only way to do this is to first delete the row then insert > new > > >>> data > > >>> > in > > >>> > > its place, correct? Or is there an operation to do this? > > >>> > > > > >>> > > Cheers, > > >>> > > -Kristoffer > > >>> > > > > >>> > > > >>> > > >> > > >> > > > > > > --bcaec5431b80358c2b04dac59f4b--