public static InetAddress getRemoteIp() {
    RpcCall call = CurCall.get();
    if (call != null) {
      return call.getRemoteAddress();
    }
    return null;
  }
Returns the remote side ip address when invoked inside an RPC Returns null incase of an error.
hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java