HADOOP-7685. Improved directory ownership check function in

hadoop-setup-conf.sh. (Eric Yang)


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1178671 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Eric Yang 2011-10-04 01:58:32 +00:00
parent 5c4ed07c76
commit 97a60315b1
2 changed files with 10 additions and 4 deletions

View File

@ -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

View File

@ -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" ]; then
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=""