You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ji...@apache.org on 2017/01/25 05:58:55 UTC
hadoop git commit: HDFS-11365. Log portnumber in
PrivilegedNfsGatewayStarter. Contributed by Mukul Kumar Singh.
Repository: hadoop
Updated Branches:
refs/heads/trunk 9c0a4d3e7 -> 5a5652098
HDFS-11365. Log portnumber 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/5a565209
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/5a565209
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/5a565209
Branch: refs/heads/trunk
Commit: 5a5652098c0c717fee045e12bcaf7cf5a72635ea
Parents: 9c0a4d3
Author: Jitendra Pandey <ji...@apache.org>
Authored: Tue Jan 24 21:58:02 2017 -0800
Committer: Jitendra Pandey <ji...@apache.org>
Committed: Tue Jan 24 21:58:02 2017 -0800
----------------------------------------------------------------------
.../hdfs/nfs/nfs3/PrivilegedNfsGatewayStarter.java | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/5a565209/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 3934d7c..695cbc3 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
@@ -18,9 +18,12 @@ package org.apache.hadoop.hdfs.nfs.nfs3;
import java.net.DatagramSocket;
import java.net.InetSocketAddress;
+import java.net.SocketException;
import org.apache.commons.daemon.Daemon;
import org.apache.commons.daemon.DaemonContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.hdfs.nfs.conf.NfsConfigKeys;
import org.apache.hadoop.hdfs.nfs.conf.NfsConfiguration;
@@ -34,7 +37,7 @@ import org.apache.hadoop.hdfs.nfs.conf.NfsConfiguration;
* Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=594880
*/
public class PrivilegedNfsGatewayStarter implements Daemon {
-
+ static final Log LOG = LogFactory.getLog(PrivilegedNfsGatewayStarter.class);
private String[] args = null;
private DatagramSocket registrationSocket = null;
@@ -49,9 +52,15 @@ public class PrivilegedNfsGatewayStarter implements Daemon {
NfsConfigKeys.DFS_NFS_REGISTRATION_PORT_KEY + "' configured to a " +
"privileged port.");
}
- registrationSocket = new DatagramSocket(
- new InetSocketAddress("localhost", clientPort));
- registrationSocket.setReuseAddress(true);
+
+ try {
+ registrationSocket = new DatagramSocket(
+ new InetSocketAddress("localhost", clientPort));
+ registrationSocket.setReuseAddress(true);
+ } catch (SocketException e) {
+ LOG.error("Init failed for port=" + clientPort, e);
+ throw e;
+ }
args = context.getArguments();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org