From 229472cea7920194c48f5294bf763a8bee2ade63 Mon Sep 17 00:00:00 2001 From: Jing Zhao Date: Tue, 19 Nov 2013 07:42:02 +0000 Subject: [PATCH] HADOOP-10107. Server.getNumOpenConnections may throw NPE. Contributed by Kihwal Lee. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1543335 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../src/main/java/org/apache/hadoop/ipc/Server.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 8bb5f084345..2b9aeb88a5a 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -439,6 +439,9 @@ Release 2.3.0 - UNRELEASED HADOOP-10100. MiniKDC shouldn't use apacheds-all artifact. (rkanter via tucu) + HADOOP-10107. Server.getNumOpenConnections may throw NPE. (Kihwal Lee via + jing9) + Release 2.2.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java index b8dc754c74f..7fb395cdb05 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java @@ -2109,6 +2109,7 @@ public abstract class Server { // Start the listener here and let it bind to the port listener = new Listener(); this.port = listener.getAddress().getPort(); + connectionManager = new ConnectionManager(); this.rpcMetrics = RpcMetrics.create(this); this.rpcDetailedMetrics = RpcDetailedMetrics.create(this.port); this.tcpNoDelay = conf.getBoolean( @@ -2117,7 +2118,6 @@ public abstract class Server { // Create the responder here responder = new Responder(); - connectionManager = new ConnectionManager(); if (secretManager != null) { SaslRpcServer.init(conf);