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 2018/01/05 19:26:53 UTC
[1/4] hbase git commit: HBASE-19708 Avoid NPE when the RPC listener's
accept channel is closed
Repository: hbase
Updated Branches:
refs/heads/branch-1 b5ec4d381 -> b528cd01b
refs/heads/branch-1.2 197772525 -> d48f9e4d4
refs/heads/branch-1.3 aded33e20 -> 09b32ca38
refs/heads/branch-1.4 6b3023422 -> 5c16cc6af
HBASE-19708 Avoid NPE when the RPC listener's accept channel is closed
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/5c16cc6a
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/5c16cc6a
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/5c16cc6a
Branch: refs/heads/branch-1.4
Commit: 5c16cc6af553cd9280e5a0682564ff771c5c86a9
Parents: 6b30234
Author: Andrew Purtell <ap...@apache.org>
Authored: Thu Jan 4 15:57:32 2018 -0800
Committer: Andrew Purtell <ap...@apache.org>
Committed: Fri Jan 5 09:57:59 2018 -0800
----------------------------------------------------------------------
.../src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/5c16cc6a/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 3000622..bc3b33a 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
@@ -206,6 +206,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
protected final InetSocketAddress bindAddress;
protected int port; // port we listen on
+ protected InetSocketAddress address; // inet address we listen on
private int readThreads; // number of read threads
protected int maxIdleTime; // the maximum idle time after
// which a client may be
@@ -657,6 +658,8 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
// Bind the server socket to the binding addrees (can be different from the default interface)
bind(acceptChannel.socket(), bindAddress, backlogLength);
port = acceptChannel.socket().getLocalPort(); //Could be an ephemeral port
+ address = (InetSocketAddress)acceptChannel.socket().getLocalSocketAddress();
+
// create a selector;
selector= Selector.open();
@@ -888,7 +891,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
}
InetSocketAddress getAddress() {
- return (InetSocketAddress)acceptChannel.socket().getLocalSocketAddress();
+ return address;
}
void doAccept(SelectionKey key) throws IOException, OutOfMemoryError {
@@ -2197,7 +2200,6 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
this.cellBlockBuilder = new CellBlockBuilder(conf);
-
// Create the responder here
responder = new Responder();
this.authorize = conf.getBoolean(HADOOP_SECURITY_AUTHORIZATION, false);
[3/4] hbase git commit: HBASE-19708 Avoid NPE when the RPC listener's
accept channel is closed
Posted by ap...@apache.org.
HBASE-19708 Avoid NPE when the RPC listener's accept channel is closed
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/09b32ca3
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/09b32ca3
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/09b32ca3
Branch: refs/heads/branch-1.3
Commit: 09b32ca380af8fd63f665b01270a1227978b0c2f
Parents: aded33e
Author: Andrew Purtell <ap...@apache.org>
Authored: Thu Jan 4 15:57:32 2018 -0800
Committer: Andrew Purtell <ap...@apache.org>
Committed: Fri Jan 5 09:58:25 2018 -0800
----------------------------------------------------------------------
.../src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/09b32ca3/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 c0ea148..ab42538 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
@@ -215,6 +215,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
protected final InetSocketAddress bindAddress;
protected int port; // port we listen on
+ protected InetSocketAddress address; // inet address we listen on
private int readThreads; // number of read threads
protected int maxIdleTime; // the maximum idle time after
// which a client may be
@@ -660,6 +661,8 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
// Bind the server socket to the binding addrees (can be different from the default interface)
bind(acceptChannel.socket(), bindAddress, backlogLength);
port = acceptChannel.socket().getLocalPort(); //Could be an ephemeral port
+ address = (InetSocketAddress)acceptChannel.socket().getLocalSocketAddress();
+
// create a selector;
selector= Selector.open();
@@ -890,7 +893,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
}
InetSocketAddress getAddress() {
- return (InetSocketAddress)acceptChannel.socket().getLocalSocketAddress();
+ return address;
}
void doAccept(SelectionKey key) throws IOException, OutOfMemoryError {
@@ -2192,7 +2195,6 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
this.ipcUtil = new IPCUtil(conf);
-
// Create the responder here
responder = new Responder();
this.authorize = conf.getBoolean(HADOOP_SECURITY_AUTHORIZATION, false);
[4/4] hbase git commit: HBASE-19708 Avoid NPE when the RPC listener's
accept channel is closed
Posted by ap...@apache.org.
HBASE-19708 Avoid NPE when the RPC listener's accept channel is closed
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/d48f9e4d
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d48f9e4d
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d48f9e4d
Branch: refs/heads/branch-1.2
Commit: d48f9e4d40aacb2fb624c8cfd8ecbc83be5074fd
Parents: 1977725
Author: Andrew Purtell <ap...@apache.org>
Authored: Thu Jan 4 15:57:32 2018 -0800
Committer: Andrew Purtell <ap...@apache.org>
Committed: Fri Jan 5 10:04:04 2018 -0800
----------------------------------------------------------------------
.../src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/d48f9e4d/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 45b0c18..7137530 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
@@ -209,6 +209,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
protected final InetSocketAddress bindAddress;
protected int port; // port we listen on
+ protected InetSocketAddress address; // inet address we listen on
private int readThreads; // number of read threads
protected int maxIdleTime; // the maximum idle time after
// which a client may be
@@ -584,6 +585,8 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
// Bind the server socket to the binding addrees (can be different from the default interface)
bind(acceptChannel.socket(), bindAddress, backlogLength);
port = acceptChannel.socket().getLocalPort(); //Could be an ephemeral port
+ address = (InetSocketAddress)acceptChannel.socket().getLocalSocketAddress();
+
// create a selector;
selector= Selector.open();
@@ -813,7 +816,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
}
InetSocketAddress getAddress() {
- return (InetSocketAddress)acceptChannel.socket().getLocalSocketAddress();
+ return address;
}
void doAccept(SelectionKey key) throws IOException, OutOfMemoryError {
@@ -2051,7 +2054,6 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
this.ipcUtil = new IPCUtil(conf);
-
// Create the responder here
responder = new Responder();
this.authorize = conf.getBoolean(HADOOP_SECURITY_AUTHORIZATION, false);
[2/4] hbase git commit: HBASE-19708 Avoid NPE when the RPC listener's
accept channel is closed
Posted by ap...@apache.org.
HBASE-19708 Avoid NPE when the RPC listener's accept channel is closed
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/b528cd01
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/b528cd01
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/b528cd01
Branch: refs/heads/branch-1
Commit: b528cd01b7b41c93e711c023acfb0722e0d9068c
Parents: b5ec4d3
Author: Andrew Purtell <ap...@apache.org>
Authored: Thu Jan 4 15:57:32 2018 -0800
Committer: Andrew Purtell <ap...@apache.org>
Committed: Fri Jan 5 09:58:03 2018 -0800
----------------------------------------------------------------------
.../src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/b528cd01/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 3000622..bc3b33a 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
@@ -206,6 +206,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
protected final InetSocketAddress bindAddress;
protected int port; // port we listen on
+ protected InetSocketAddress address; // inet address we listen on
private int readThreads; // number of read threads
protected int maxIdleTime; // the maximum idle time after
// which a client may be
@@ -657,6 +658,8 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
// Bind the server socket to the binding addrees (can be different from the default interface)
bind(acceptChannel.socket(), bindAddress, backlogLength);
port = acceptChannel.socket().getLocalPort(); //Could be an ephemeral port
+ address = (InetSocketAddress)acceptChannel.socket().getLocalSocketAddress();
+
// create a selector;
selector= Selector.open();
@@ -888,7 +891,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
}
InetSocketAddress getAddress() {
- return (InetSocketAddress)acceptChannel.socket().getLocalSocketAddress();
+ return address;
}
void doAccept(SelectionKey key) throws IOException, OutOfMemoryError {
@@ -2197,7 +2200,6 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
this.cellBlockBuilder = new CellBlockBuilder(conf);
-
// Create the responder here
responder = new Responder();
this.authorize = conf.getBoolean(HADOOP_SECURITY_AUTHORIZATION, false);