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 ec...@apache.org on 2015/09/15 21:12:35 UTC

[50/50] [abbrv] hadoop git commit: HADOOP-11630 Allow HDFS to bind to ipv6 conditionally

HADOOP-11630 Allow HDFS to bind to ipv6 conditionally

Signed-off-by: Elliott Clark <el...@fb.com>


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

Branch: refs/heads/HADOOP-11890
Commit: a3d952b4d27016d079e264e211169b22c1c59693
Parents: ce69c9b
Author: Elliott Clark <el...@fb.com>
Authored: Tue Feb 24 13:08:28 2015 -0800
Committer: Elliott Clark <el...@fb.com>
Committed: Tue Sep 15 12:09:53 2015 -0700

----------------------------------------------------------------------
 .../hadoop-common/src/main/bin/hadoop-functions.sh             | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/a3d952b4/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
index b9b7919..208edae 100755
--- a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
+++ b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
@@ -269,7 +269,11 @@ function hadoop_bootstrap
   export HADOOP_OS_TYPE=${HADOOP_OS_TYPE:-$(uname -s)}
 
   # defaults
-  export HADOOP_OPTS=${HADOOP_OPTS:-"-Djava.net.preferIPv4Stack=true"}
+  if [[ "${HADOOP_ALLOW_IPV6}" -ne "yes" ]]; then
+    export HADOOP_OPTS=${HADOOP_OPTS:-"-Djava.net.preferIPv4Stack=true"}
+  else
+    export HADOOP_OPTS=${HADOOP_OPTS:-""}
+  fi
   hadoop_debug "Initial HADOOP_OPTS=${HADOOP_OPTS}"
 }