HBASE-6433 Improve HBaseServer#getRemoteAddress by utilizing HBaseServer.Connection.hostAddress (binlijin)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1363905 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ce00f26e71
commit
75e5903748
|
@ -223,8 +223,11 @@ public abstract class HBaseServer implements RpcServer {
|
|||
* @return String
|
||||
*/
|
||||
public static String getRemoteAddress() {
|
||||
InetAddress addr = getRemoteIp();
|
||||
return (addr == null) ? null : addr.getHostAddress();
|
||||
Call call = CurCall.get();
|
||||
if (call != null) {
|
||||
return call.connection.getHostAddress();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
protected String bindAddress;
|
||||
|
|
Loading…
Reference in New Issue