Repository: hadoop Updated Branches: refs/heads/branch-2 b0a1703f1 -> f17d3eddc refs/heads/trunk 0914fcca3 -> e0235842a
HDFS-11387. Socket reuse address option is not honored in PrivilegedNfsGatewayStarter. Contributed by Mukul Kumar Singh. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/e0235842 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/e0235842 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/e0235842 Branch: refs/heads/trunk Commit: e0235842a74f1a1a62051ebb8c9dbd47324fcc25 Parents: 0914fcc Author: Arpit Agarwal <a...@apache.org> Authored: Fri Feb 3 12:28:05 2017 -0800 Committer: Arpit Agarwal <a...@apache.org> Committed: Fri Feb 3 12:28:05 2017 -0800 ---------------------------------------------------------------------- .../hadoop/hdfs/nfs/nfs3/PrivilegedNfsGatewayStarter.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/e0235842/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/PrivilegedNfsGatewayStarter.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/PrivilegedNfsGatewayStarter.java b/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/PrivilegedNfsGatewayStarter.java index 695cbc3..9456caf 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/PrivilegedNfsGatewayStarter.java +++ b/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/PrivilegedNfsGatewayStarter.java @@ -54,9 +54,11 @@ public class PrivilegedNfsGatewayStarter implements Daemon { } try { - registrationSocket = new DatagramSocket( - new InetSocketAddress("localhost", clientPort)); + InetSocketAddress socketAddress = + new InetSocketAddress("localhost", clientPort); + registrationSocket = new DatagramSocket(null); registrationSocket.setReuseAddress(true); + registrationSocket.bind(socketAddress); } catch (SocketException e) { LOG.error("Init failed for port=" + clientPort, e); throw e; --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org