hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1533295 - /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java
Date Fri, 18 Oct 2013 00:08:33 GMT
Author: stack
Date: Fri Oct 18 00:08:33 2013
New Revision: 1533295

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

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

Modified: hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java?rev=1533295&r1=1533294&r2=1533295&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java
(original)
+++ hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java
Fri Oct 18 00:08:33 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
+}



Mime
View raw message