hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r1178671 - in /hadoop/common/trunk/hadoop-common-project/hadoop-common: CHANGES.txt src/main/packages/hadoop-setup-conf.sh
Date Tue, 04 Oct 2011 01:58:32 GMT
Author: eyang
Date: Tue Oct  4 01:58:32 2011
New Revision: 1178671

URL: http://svn.apache.org/viewvc?rev=1178671&view=rev
Log:
HADOOP-7685. Improved directory ownership check function in 
hadoop-setup-conf.sh. (Eric Yang)

Modified:
    hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
    hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/packages/hadoop-setup-conf.sh

Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1178671&r1=1178670&r2=1178671&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt Tue Oct  4 01:58:32
2011
@@ -652,6 +652,9 @@ Release 0.23.0 - Unreleased
 
     HADOOP-7715. Removed unnecessary security logger configuration. (Eric Yang)
 
+    HADOOP-7685. Improved directory ownership check function in 
+    hadoop-setup-conf.sh. (Eric Yang)
+
 Release 0.22.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/packages/hadoop-setup-conf.sh
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/packages/hadoop-setup-conf.sh?rev=1178671&r1=1178670&r2=1178671&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/packages/hadoop-setup-conf.sh
(original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/packages/hadoop-setup-conf.sh
Tue Oct  4 01:58:32 2011
@@ -60,9 +60,11 @@ check_permission() {
   OWNER="0"
   RESULT=0
   while [ "$TARGET" != "/" ]; do
-    PARENT=`dirname $TARGET`
-    NAME=`basename $TARGET`
-    OWNER=`ls -ln $PARENT | grep $NAME| awk '{print $3}'`
+    if [ "`uname`" = "Darwin" ]; then
+      OWNER=`stat -f %u $TARGET`
+    else
+      OWNER=`stat -c %u $TARGET`
+    fi
     if [ "$OWNER" != "0" ]; then
       RESULT=1
       break
@@ -247,6 +249,7 @@ AUTOSETUP=${AUTOSETUP:-1}
 JAVA_HOME=${JAVA_HOME:-/usr/java/default}
 HADOOP_GROUP=${HADOOP_GROUP:-hadoop}
 HADOOP_NN_HOST=${HADOOP_NN_HOST:-`hostname`}
+HADOOP_SNN_HOST=${HADOOP_SNN_HOST:-`hostname`}
 HADOOP_NN_DIR=${HADOOP_NN_DIR:-/var/lib/hadoop/hdfs/namenode}
 HADOOP_DN_DIR=${HADOOP_DN_DIR:-/var/lib/hadoop/hdfs/datanode}
 HADOOP_JT_HOST=${HADOOP_JT_HOST:-`hostname`}
@@ -273,7 +276,7 @@ if [ "${SECURITY_TYPE}" = "kerberos" ]; 
   HADOOP_SECURE_DN_USER=${HADOOP_HDFS_USER}
 else
   TASK_CONTROLLER="org.apache.hadoop.mapred.DefaultTaskController"
-  HADDOP_DN_ADDR="0.0.0.0:50010"
+  HADOOP_DN_ADDR="0.0.0.0:50010"
   HADOOP_DN_HTTP_ADDR="0.0.0.0:50075"
   SECURITY="false"
   HADOOP_SECURE_DN_USER=""



Mime
View raw message