HBASE-4181 HConnectionManager can't find cached HRegionInterface and makes clients work very slow
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1155424 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b8a46d3862
commit
ac8b6f9e2d
|
@ -194,6 +194,8 @@ Release 0.91.0 - Unreleased
|
|||
if it already exists (Mikhail Bautin)
|
||||
HBASE-4179 Failed to run RowCounter on top of Hadoop branch-0.22
|
||||
(Michael Weng)
|
||||
HBASE-4181 HConnectionManager can't find cached HRegionInterface and makes clients
|
||||
work very slow (Jia Liu)
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)
|
||||
|
|
|
@ -1166,8 +1166,13 @@ public class HConnectionManager {
|
|||
throws IOException {
|
||||
if (master) getMaster();
|
||||
HRegionInterface server;
|
||||
String rsName = isa != null?
|
||||
isa.toString(): Addressing.createHostAndPortStr(hostname, port);
|
||||
String rsName = null;
|
||||
if (isa != null) {
|
||||
rsName = Addressing.createHostAndPortStr(isa.getHostName(),
|
||||
isa.getPort());
|
||||
} else {
|
||||
rsName = Addressing.createHostAndPortStr(hostname, port);
|
||||
}
|
||||
// See if we already have a connection (common case)
|
||||
server = this.servers.get(rsName);
|
||||
if (server == null) {
|
||||
|
@ -1190,7 +1195,8 @@ public class HConnectionManager {
|
|||
serverInterfaceClass, HRegionInterface.VERSION,
|
||||
address, this.conf,
|
||||
this.maxRPCAttempts, this.rpcTimeout, this.rpcTimeout);
|
||||
this.servers.put(address.toString(), server);
|
||||
this.servers.put(Addressing.createHostAndPortStr(
|
||||
address.getHostName(), address.getPort()), server);
|
||||
} catch (RemoteException e) {
|
||||
LOG.warn("RemoteException connecting to RS", e);
|
||||
// Throw what the RemoteException was carrying.
|
||||
|
|
Loading…
Reference in New Issue