hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1239220 - in /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client: HConnectionManager.java ServerCallable.java
Date Wed, 01 Feb 2012 17:34:05 GMT
Author: tedyu
Date: Wed Feb  1 17:34:04 2012
New Revision: 1239220

URL: http://svn.apache.org/viewvc?rev=1239220&view=rev
Log:
HBASE-5310 HConnectionManager server cache key enhancement (Jimmy Xiang)

Modified:
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/ServerCallable.java

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java?rev=1239220&r1=1239219&r2=1239220&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java Wed Feb
 1 17:34:04 2012
@@ -1156,7 +1156,7 @@ public class HConnectionManager {
         for (Map<byte[], HRegionLocation> tableLocations :
           cachedRegionLocations.values()) {
           for (Entry<byte[], HRegionLocation> e : tableLocations.entrySet()) {
-            if (e.getValue().getServerAddress().toString().equals(server)) {
+            if (e.getValue().getHostnamePort().equals(server)) {
               tableLocations.remove(e.getKey());
               deletedSomething = true;
             }
@@ -1215,7 +1215,7 @@ public class HConnectionManager {
         getTableLocations(tableName);
       boolean hasNewCache = false;
       synchronized (this.cachedRegionLocations) {
-        cachedServers.add(location.getServerAddress().toString());
+        cachedServers.add(location.getHostnamePort());
         hasNewCache = (tableLocations.put(startKey, location) == null);
       }
       if (hasNewCache) {

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/ServerCallable.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/ServerCallable.java?rev=1239220&r1=1239219&r2=1239220&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/ServerCallable.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/ServerCallable.java Wed Feb 
1 17:34:04 2012
@@ -172,7 +172,7 @@ public abstract class ServerCallable<T> 
           // .META. again to find the new location
           HRegionLocation hrl = location;
           if (hrl != null) {
-            getConnection().clearCaches(hrl.getServerAddress().toString());
+            getConnection().clearCaches(hrl.getHostnamePort());
           }
         }
         RetriesExhaustedException.ThrowableWithExtraContext qt =



Mime
View raw message