Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A7801DC75 for ; Thu, 14 Mar 2013 22:44:13 +0000 (UTC) Received: (qmail 98921 invoked by uid 500); 14 Mar 2013 22:44:13 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 98885 invoked by uid 500); 14 Mar 2013 22:44:13 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 98876 invoked by uid 99); 14 Mar 2013 22:44:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Mar 2013 22:44:13 +0000 Date: Thu, 14 Mar 2013 22:44:13 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-8112) Deprecate HTable#batch(final List) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-8112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-8112: -------------------------- Description: This was brought up by Amit's inquiry on mailing list, entitled 'Batch returned value and exception handling' Here is his sample code: {code} Object[] res = null; try { res = table.batch(batch); } catch (RetriesExhaustedWithDetailsException retriesExhaustedWithDetailsException) { retriesExhaustedWithDetailsException.printStackTrace(); } if (res == null) { System.out.println("No results - returned null."); } {code} When RetriesExhaustedWithDetailsException was thrown from batch() call, variable res carried value of null. Meaning user wouldn't get partial result along with the exception. We should deprecate HTable#batch(final List) and refer to the following method: void batch(final List actions, final Object[] results) throws IOException, InterruptedException; was: This was brought up by Amit's inquiry on mailing list, entitled 'Batch returned value and exception handling' Here is his sample code: {code} Object[] res = null; try { res = table.batch(batch); } catch (RetriesExhaustedWithDetailsException retriesExhaustedWithDetailsException) { retriesExhaustedWithDetailsException.printStackTrace(); } if (res == null) { System.out.println("No results - returned null."); } {code} When RetriesExhaustedWithDetailsException was thrown from batch() call, variable res carried value of null. Meaning user wouldn't get partial result along with the exception. We should deprecate {{HTable#batch(final List)}} and refer to the following method: void batch(final List actions, final Object[] results) throws IOException, InterruptedException; > Deprecate HTable#batch(final List) > ------------------------------------------------- > > Key: HBASE-8112 > URL: https://issues.apache.org/jira/browse/HBASE-8112 > Project: HBase > Issue Type: Bug > Reporter: Ted Yu > Priority: Minor > > This was brought up by Amit's inquiry on mailing list, entitled 'Batch returned value and exception handling' > Here is his sample code: > {code} > Object[] res = null; > try { > res = table.batch(batch); > } catch (RetriesExhaustedWithDetailsException retriesExhaustedWithDetailsException) { > retriesExhaustedWithDetailsException.printStackTrace(); > } > if (res == null) { > System.out.println("No results - returned null."); > } > {code} > When RetriesExhaustedWithDetailsException was thrown from batch() call, variable res carried value of null. > Meaning user wouldn't get partial result along with the exception. > We should deprecate HTable#batch(final List) and refer to the following method: > void batch(final List actions, final Object[] results) throws IOException, InterruptedException; -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira