From user-return-39320-apmail-hbase-user-archive=hbase.apache.org@hbase.apache.org Thu Oct 3 16:08:20 2013 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 C6F7A101A4 for ; Thu, 3 Oct 2013 16:08:20 +0000 (UTC) Received: (qmail 93485 invoked by uid 500); 3 Oct 2013 16:08:16 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 93454 invoked by uid 500); 3 Oct 2013 16:08: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 93444 invoked by uid 99); 3 Oct 2013 16:08:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Oct 2013 16:08:15 +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 renatoj.marroquin@gmail.com designates 209.85.214.53 as permitted sender) Received: from [209.85.214.53] (HELO mail-bk0-f53.google.com) (209.85.214.53) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Oct 2013 16:08:10 +0000 Received: by mail-bk0-f53.google.com with SMTP id d7so1015462bkh.40 for ; Thu, 03 Oct 2013 09:07:49 -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; bh=rl4aFQDZBGQr+vxqCcSJWTaOl8uh8OeZAMla63Fiwho=; b=nov241kw6UeYI5ELypsaZW6gUhrzRw8igrEP16tmVq2A83y8gWEXGkhAVgIu5u17yb IO+h9/pWikDg5HBX+Pp1UoRtAeNa10x43nf1BHGuYjL8+i/Ly2Egsd+OYfUwBLjQdGSu AOtDkMKDDJLASdlThFUSa3QrZUwL0uRAavvEpoKvq1xSgkT59ectqLtbEYekej+U+F4P KriwDQ6/RZAbBXLQSzLVbHHALEm402CPacGEULTxnZKupakZnBDQu2aUAJO+CoJ3fR08 TPRfvo7n0ZaKCGhuyQtnSwljxbSQAA7JIfQC1Oe/9WAyhQqHMYr+5LDBGrIsCKwIvVh7 cLcA== MIME-Version: 1.0 X-Received: by 10.205.64.9 with SMTP id xg9mr2720810bkb.30.1380816469116; Thu, 03 Oct 2013 09:07:49 -0700 (PDT) Received: by 10.205.9.73 with HTTP; Thu, 3 Oct 2013 09:07:49 -0700 (PDT) In-Reply-To: <1380757980.56738.YahooMailNeo@web140606.mail.bf1.yahoo.com> References: <1380757980.56738.YahooMailNeo@web140606.mail.bf1.yahoo.com> Date: Thu, 3 Oct 2013 11:07:49 -0500 Message-ID: Subject: Re: Batch method From: =?ISO-8859-1?Q?Renato_Marroqu=EDn_Mogrovejo?= To: user@hbase.apache.org, lars hofhansl Content-Type: multipart/alternative; boundary=bcaec53fee9d248b8104e7d863e7 X-Virus-Checked: Checked by ClamAV on apache.org --bcaec53fee9d248b8104e7d863e7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Lars, Just looking for a way to solve my problems ;) I want to create a ListenableFuture to help me know when the HBase operations have finished, and I am trying to find a way to do this more elegantly than just going through the exception's information. I mean I will get the exception catch, resume operations and continue with the next op, but I thought there was a way to get a list of objects containing the status of the operation. That was why I was asking about the array of objects returned by the batch operation, but I think that will do it for now. Thanks Lars! Renato M. 2013/10/2 lars hofhansl > Hi Renato, > > are seeing a specific issue or are wondering looking at the code? > > You should get an exception if any of the operations fail. That exception > has the all the information you need: The set of exceptions, the actions > that caused them, and on which servers. > If you decide not to use that Exception (i.e. you catch it and ignore it) > the returned array has the results at the same position as the passed Lis= t. > > -- Lars > > > > ________________________________ > From: Renato Marroqu=EDn Mogrovejo > To: user@hbase.apache.org > Sent: Wednesday, October 2, 2013 4:15 PM > Subject: Re: Batch method > > > Yeah, I am using such method, but if I get a null in the Objects array, h= ow > do I know which operation failed? > > > > 2013/10/2 Ted Yu > > > How about this method ? > > > > > http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/HTable.htm= l#batch(java.util.List > > , > > java.lang.Object[]) > > > > > > On Wed, Oct 2, 2013 at 3:57 PM, Renato Marroqu=EDn Mogrovejo < > > renatoj.marroquin@gmail.com> wrote: > > > > > Hi Ted, > > > > > > Thank you very much for answering! But I don't think HBASE-8112 is > > related > > > to my question. I saw that the signature of the method changed in ord= er > > to > > > retrieve partial results. I am using HBase 0.94.10 so does this versi= on > > > will work like this? > > > And anyway, my problem is to determine which operation failed within = a > > > batch of operations. Is this possible? > > > > > > > > > Renato M. > > > > > > > > > 2013/10/2 Ted Yu > > > > > > > Looks like this is related: > > > > HBASE-8112 Deprecate HTable#batch(final List) > > > > > > > > > > > > On Wed, Oct 2, 2013 at 3:35 PM, Renato Marroqu=EDn Mogrovejo < > > > > renatoj.marroquin@gmail.com> wrote: > > > > > > > > > Hi all, > > > > > > > > > > I am using the batch method[1] and it states that I will get an > array > > > of > > > > > objects containing possibly null values. So my question is if the= re > > is > > > a > > > > > way on knowing which operation was the one that failed from this > null > > > > > value? Or any other way in which I could check for the failing > > > operation? > > > > > Thanks in advance. > > > > > > > > > > > > > > > Renato M. > > > > > > > > > > [1] > > > > > > > > > > > > > > > > > > > > http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/HTable.htm= l#batch(java.util.List) > > > > > > > > > > > > > > > --bcaec53fee9d248b8104e7d863e7--