You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2013/10/18 02:09:06 UTC

svn commit: r1533296 - /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java

Author: stack
Date: Fri Oct 18 00:09:05 2013
New Revision: 1533296

URL: http://svn.apache.org/r1533296
Log:
HBASE-9796 npe in RegionServerCallable

Modified:
    hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java

Modified: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java?rev=1533296&r1=1533295&r2=1533296&view=diff
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java (original)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java Fri Oct 18 00:09:05 2013
@@ -117,7 +117,7 @@ public abstract class RegionServerCallab
       // if thrown these exceptions, we clear all the cache entries that
       // map to that slow/dead server; otherwise, let cache miss and ask
       // hbase:meta again to find the new location
-      getConnection().clearCaches(location.getServerName());
+      if (this.location != null) getConnection().clearCaches(location.getServerName());
     } else if (t instanceof RegionMovedException) {
       getConnection().updateCachedLocations(tableName, row, t, location);
     } else if (t instanceof NotServingRegionException && !retrying) {
@@ -136,7 +136,7 @@ public abstract class RegionServerCallab
   public long sleep(long pause, int tries) {
     // Tries hasn't been bumped up yet so we use "tries + 1" to get right pause time
     long sleep = ConnectionUtils.getPauseTime(pause, tries + 1);
-    if (sleep < MIN_WAIT_DEAD_SERVER 
+    if (sleep < MIN_WAIT_DEAD_SERVER
         && (location == null || getConnection().isDeadServer(location.getServerName()))) {
       sleep = ConnectionUtils.addJitter(MIN_WAIT_DEAD_SERVER, 0.10f);
     }
@@ -152,4 +152,4 @@ public abstract class RegionServerCallab
     }
     return this.location.getRegionInfo();
   }
-}
\ No newline at end of file
+}