You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2016/01/16 04:27:36 UTC

[05/10] hbase git commit: Amend HBASE-14771 RpcServer#getRemoteAddress always returns null

Amend HBASE-14771 RpcServer#getRemoteAddress always returns null

This change has been reported to cause Phoenix's PhoenixIndexRpcSchedulerTest to fail
with a NPE


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/1f1a8fd7
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/1f1a8fd7
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/1f1a8fd7

Branch: refs/heads/branch-1
Commit: 1f1a8fd7d3f80bd98bae1ed3b604b4bdb692c1de
Parents: 795f914
Author: Andrew Purtell <ap...@apache.org>
Authored: Fri Jan 15 17:32:43 2016 -0800
Committer: Andrew Purtell <ap...@apache.org>
Committed: Fri Jan 15 19:27:14 2016 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/1f1a8fd7/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
index 4c93d80..f8f9875 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
@@ -2591,7 +2591,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
    */
   public static InetAddress getRemoteIp() {
     Call call = CurCall.get();
-    if (call != null && call.connection.socket != null) {
+    if (call != null && call.connection != null && call.connection.socket != null) {
       return call.connection.socket.getInetAddress();
     }
     return null;