Author: jxiang
Date: Fri Jul 26 22:58:05 2013
New Revision: 1507503

URL: http://svn.apache.org/r1507503
Log:
HBASE-9048 HCM throws NullPointerException under load

Modified:
    
hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java

Modified: 
hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
URL: 
http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java?rev=1507503&r1=1507502&r2=1507503&view=diff
==============================================================================
--- 
hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
 (original)
+++ 
hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
 Fri Jul 26 22:58:05 2013
@@ -1085,7 +1085,9 @@ public class HConnectionManager {
         for (Map<byte[], HRegionLocation> tableLocations :
             cachedRegionLocations.values()) {
           for (Entry<byte[], HRegionLocation> e : tableLocations.entrySet()) {
-            if (serverName.equals(e.getValue().getServerName())) {
+            HRegionLocation value = e.getValue();
+            if (value != null
+                && serverName.equals(value.getServerName())) {
               tableLocations.remove(e.getKey());
               deletedSomething = true;
             }


Reply via email to