hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject svn commit: r1062543 - in /hadoop/common/trunk: CHANGES.txt bin/hadoop-config.sh conf/hadoop-env.sh.template
Date Sun, 23 Jan 2011 22:08:34 GMT
Author: shv
Date: Sun Jan 23 22:08:34 2011
New Revision: 1062543

URL: http://svn.apache.org/viewvc?rev=1062543&view=rev
Log:
HADOOP-6056. Use java.net.preferIPv4Stack to force IPv4. Contributed by Michele Catasta.

Modified:
    hadoop/common/trunk/CHANGES.txt
    hadoop/common/trunk/bin/hadoop-config.sh
    hadoop/common/trunk/conf/hadoop-env.sh.template

Modified: hadoop/common/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/CHANGES.txt?rev=1062543&r1=1062542&r2=1062543&view=diff
==============================================================================
--- hadoop/common/trunk/CHANGES.txt (original)
+++ hadoop/common/trunk/CHANGES.txt Sun Jan 23 22:08:34 2011
@@ -263,6 +263,9 @@ Release 0.22.0 - Unreleased
     HADOOP-7104. Remove unnecessary DNS reverse lookups from RPC layer
     (Kan Zhang via todd)
 
+    HADOOP-6056. Use java.net.preferIPv4Stack to force IPv4.
+    (Michele Catasta via shv)
+
   OPTIMIZATIONS
 
     HADOOP-6884. Add LOG.isDebugEnabled() guard for each LOG.debug(..).

Modified: hadoop/common/trunk/bin/hadoop-config.sh
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/bin/hadoop-config.sh?rev=1062543&r1=1062542&r2=1062543&view=diff
==============================================================================
--- hadoop/common/trunk/bin/hadoop-config.sh (original)
+++ hadoop/common/trunk/bin/hadoop-config.sh Sun Jan 23 22:08:34 2011
@@ -69,6 +69,15 @@ if [ -f "${HADOOP_CONF_DIR}/hadoop-env.s
   . "${HADOOP_CONF_DIR}/hadoop-env.sh"
 fi
 
+# check if net.ipv6.bindv6only is set to 1
+bindv6only=$(/sbin/sysctl -n net.ipv6.bindv6only 2> /dev/null)
+if [ -n "$bindv6only" ] && [ "$bindv6only" -eq "1" ] && [ "$HADOOP_ALLOW_IPV6"
!= "yes" ]
+then
+  echo "Error: \"net.ipv6.bindv6only\" is set to 1 - Java networking could be broken"
+  echo "For more info: http://wiki.apache.org/hadoop/HadoopIPv6"
+  exit 1
+fi
+
 # some Java parameters
 if [ "$JAVA_HOME" != "" ]; then
   #echo "run java in $JAVA_HOME"
@@ -211,6 +220,9 @@ if [ "x$JAVA_LIBRARY_PATH" != "x" ]; the
 fi  
 HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.policy.file=$HADOOP_POLICYFILE"
 
+# Disable ipv6 as it can cause issues
+HADOOP_OPTS="$HADOOP_OPTS -Djava.net.preferIPv4Stack=true"
+
 # put hdfs in classpath if present
 if [ "$HADOOP_HDFS_HOME" = "" ]; then
   if [ -d "${HADOOP_HOME}/hdfs" ]; then

Modified: hadoop/common/trunk/conf/hadoop-env.sh.template
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/conf/hadoop-env.sh.template?rev=1062543&r1=1062542&r2=1062543&view=diff
==============================================================================
--- hadoop/common/trunk/conf/hadoop-env.sh.template (original)
+++ hadoop/common/trunk/conf/hadoop-env.sh.template Sun Jan 23 22:08:34 2011
@@ -52,3 +52,6 @@ export HADOOP_JOBTRACKER_OPTS="-Dcom.sun
 
 # The scheduling priority for daemon processes.  See 'man nice'.
 # export HADOOP_NICENESS=10
+
+# Allow Hadoop to run with sysctl net.ipv6.bindv6only = 1
+# export HADOOP_ALLOW_IPV6=yes



Mime
View raw message