You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by li...@apache.org on 2014/04/29 20:18:42 UTC
svn commit: r1591043 -
/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/TableServers.java
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<Get>(orig_list.size());