Author: enis
Date: Thu Feb 13 01:56:11 2014
New Revision: 1567827

URL: http://svn.apache.org/r1567827
Log:
HBASE-10517 NPE in MetaCache.clearCache()

Modified:
    
hbase/branches/hbase-10070/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetaCache.java

Modified: 
hbase/branches/hbase-10070/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetaCache.java
URL: 
http://svn.apache.org/viewvc/hbase/branches/hbase-10070/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetaCache.java?rev=1567827&r1=1567826&r2=1567827&view=diff
==============================================================================
--- 
hbase/branches/hbase-10070/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetaCache.java
 (original)
+++ 
hbase/branches/hbase-10070/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetaCache.java
 Thu Feb 13 01:56:11 2014
@@ -336,6 +336,9 @@ public class MetaCache {
     TableName tableName = location.getRegionInfo().getTable();
     ConcurrentMap<byte[], RegionLocations> tableLocations = 
getTableLocations(tableName);
     RegionLocations rll = 
tableLocations.get(location.getRegionInfo().getStartKey());
+    if (rll == null) {
+      return;
+    }
     RegionLocations updatedLocations = rll.remove(location);
     if (updatedLocations.isEmpty()) {
       tableLocations.remove(location.getRegionInfo().getStartKey(), rll);


Reply via email to