HBASE-5310 HConnectionManager server cache key enhancement (Jimmy Xiang)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1239220 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4b698e776d
commit
457d51bec5
|
@ -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) {
|
||||
|
|
|
@ -172,7 +172,7 @@ public abstract class ServerCallable<T> implements Callable<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 =
|
||||
|
|
Loading…
Reference in New Issue