Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 458341088C for ; Tue, 29 Apr 2014 18:19:07 +0000 (UTC) Received: (qmail 36296 invoked by uid 500); 29 Apr 2014 18:19:06 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 36258 invoked by uid 500); 29 Apr 2014 18:19:06 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 36240 invoked by uid 99); 29 Apr 2014 18:19:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Apr 2014 18:19:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Apr 2014 18:19:05 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 751932388906; Tue, 29 Apr 2014 18:18:42 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1591043 - /hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/TableServers.java Date: Tue, 29 Apr 2014 18:18:42 -0000 To: commits@hbase.apache.org From: liyin@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140429181842.751932388906@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: liyin Date: Tue Apr 29 18:18:42 2014 New Revision: 1591043 URL: http://svn.apache.org/r1591043 Log: [HBASE-9704] Catch NPE from TableServers.translateException in batchGet Author: manukranthk Summary: batchGet had a bunch of retries and is supposed to move on in case the response from one regionserver was not populated. But in fact it runs into this NullPointerException and ends up quitting the retry. Test Plan: Test on Puma. Reviewers: gauravm Reviewed By: gauravm CC: hbase-eng@ Differential Revision: https://phabricator.fb.com/D1300627 Task ID: 4237701 Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/TableServers.java Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/TableServers.java URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/TableServers.java?rev=1591043&r1=1591042&r2=1591043&view=diff ============================================================================== --- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/TableServers.java (original) +++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/TableServers.java Tue Apr 29 18:18:42 2014 @@ -1999,7 +1999,7 @@ private HRegionLocation locateMetaInRoot if (resp == null) { // Entire server failed - LOG.debug("Failed all for server: " + address + LOG.info("Failed all for server: " + address + ", removing from cache"); } @@ -2082,7 +2082,12 @@ private HRegionLocation locateMetaInRoot } } catch (Exception ex) { // If response is null, we will catch a NPE here. - translateException(ex); + try { + translateException(ex); + } catch (NullPointerException nullPtrex) { + // This case we don't need to panic and throw an exception. Instead, + // we should populate the failed requests and return to the caller. + } if (newWorkingList == null) newWorkingList = new ArrayList(orig_list.size());