HADOOP-7438. Fix deprecated warnings from hadoop-daemon.sh script. Contributed by Ravi Prakash.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1150914 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Suresh Srinivas 2011-07-25 21:12:18 +00:00
parent 672064500c
commit db9d8333b4
2 changed files with 18 additions and 2 deletions

View File

@ -350,7 +350,8 @@ Trunk (unreleased changes)
HADOOP-7268. FileContext.getLocalFSFileContext() behavior needs to be fixed
w.r.t tokens. (jitendra)
HADOOP-7290. Unit test failure in TestUserGroupInformation.testGetServerSideGroups. (Trevor Robison via eli)
HADOOP-7290. Unit test failure in
TestUserGroupInformation.testGetServerSideGroups. (Trevor Robison via eli)
HADOOP-7292. Fix racy test case TestSinkQueue. (Luke Lu via todd)
@ -416,6 +417,9 @@ Trunk (unreleased changes)
HADOOP-7111. Several TFile tests failing when native libraries are
present. (atm)
HADOOP-7438. Fix deprecated warnings from hadoop-daemon.sh script.
(Ravi Prakash via suresh)
Release 0.22.0 - Unreleased
INCOMPATIBLE CHANGES

View File

@ -137,7 +137,19 @@ case $startStop in
hadoop_rotate_log $log
echo starting $command, logging to $log
cd "$HADOOP_PREFIX"
nohup nice -n $HADOOP_NICENESS $hadoopScript --config $HADOOP_CONF_DIR $command "$@" > "$log" 2>&1 < /dev/null &
case $command in
namenode|secondarynamenode|datanode|dfs|dfsadmin|fsck|balancer)
if [ -z "$HADOOP_HDFS_HOME" ]; then
hdfsScript="$HADOOP_PREFIX"/bin/hdfs
else
hdfsScript="$HADOOP_HDFS_HOME"/bin/hdfs
fi
nohup nice -n $HADOOP_NICENESS $hdfsScript --config $HADOOP_CONF_DIR $command "$@" > "$log" 2>&1 < /dev/null &
;;
(*)
nohup nice -n $HADOOP_NICENESS $hadoopScript --config $HADOOP_CONF_DIR $command "$@" > "$log" 2>&1 < /dev/null &
;;
esac
echo $! > $pid
sleep 1; head "$log"
sleep 3;