From 2c47463cbae720cbb8035c6071603f1f37379092 Mon Sep 17 00:00:00 2001 From: Uma Maheswara Rao G Date: Sun, 1 Apr 2012 19:00:38 +0000 Subject: [PATCH] HADOOP-8199. Fix issues in start-all.sh and stop-all.sh Contributed by Devaraj K. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1308180 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 2 ++ .../hadoop-common/src/main/bin/start-all.sh | 11 ++++++++--- .../hadoop-common/src/main/bin/stop-all.sh | 11 ++++++++--- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 839336b86f..d779a980fa 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -240,6 +240,8 @@ Release 2.0.0 - UNRELEASED BUG FIXES + HADOOP-8199. Fix issues in start-all.sh and stop-all.sh (Devaraj K via umamahesh) + HADOOP-7635. RetryInvocationHandler should release underlying resources on close. (atm) diff --git a/hadoop-common-project/hadoop-common/src/main/bin/start-all.sh b/hadoop-common-project/hadoop-common/src/main/bin/start-all.sh index f91d9afef0..9d579b29af 100755 --- a/hadoop-common-project/hadoop-common/src/main/bin/start-all.sh +++ b/hadoop-common-project/hadoop-common/src/main/bin/start-all.sh @@ -18,7 +18,7 @@ # Start all hadoop daemons. Run this on master node. -echo "This script is Deprecated. Instead use start-dfs.sh and start-mapred.sh" +echo "This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh" bin=`dirname "${BASH_SOURCE-$0}"` bin=`cd "$bin"; pwd` @@ -28,6 +28,11 @@ HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR} . $HADOOP_LIBEXEC_DIR/hadoop-config.sh # start hdfs daemons if hdfs is present -if [ -f "${HADOOP_HDFS_HOME}"/bin/start-dfs.sh ]; then - "${HADOOP_HDFS_HOME}"/bin/start-dfs.sh --config $HADOOP_CONF_DIR +if [ -f "${HADOOP_HDFS_HOME}"/sbin/start-dfs.sh ]; then + "${HADOOP_HDFS_HOME}"/sbin/start-dfs.sh --config $HADOOP_CONF_DIR +fi + +# start yarn daemons if yarn is present +if [ -f "${YARN_HOME}"/sbin/start-dfs.sh ]; then + "${YARN_HOME}"/sbin/start-yarn.sh --config $HADOOP_CONF_DIR fi diff --git a/hadoop-common-project/hadoop-common/src/main/bin/stop-all.sh b/hadoop-common-project/hadoop-common/src/main/bin/stop-all.sh index 7d8bd591ea..9a2fe98fc0 100755 --- a/hadoop-common-project/hadoop-common/src/main/bin/stop-all.sh +++ b/hadoop-common-project/hadoop-common/src/main/bin/stop-all.sh @@ -18,7 +18,7 @@ # Stop all hadoop daemons. Run this on master node. -echo "This script is Deprecated. Instead use stop-dfs.sh and stop-mapred.sh" +echo "This script is Deprecated. Instead use stop-dfs.sh and stop-yarn.sh" bin=`dirname "${BASH_SOURCE-$0}"` bin=`cd "$bin"; pwd` @@ -28,6 +28,11 @@ HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR} . $HADOOP_LIBEXEC_DIR/hadoop-config.sh # stop hdfs daemons if hdfs is present -if [ -f "${HADOOP_HDFS_HOME}"/bin/stop-dfs.sh ]; then - "${HADOOP_HDFS_HOME}"/bin/stop-dfs.sh --config $HADOOP_CONF_DIR +if [ -f "${HADOOP_HDFS_HOME}"/sbin/stop-dfs.sh ]; then + "${HADOOP_HDFS_HOME}"/sbin/stop-dfs.sh --config $HADOOP_CONF_DIR +fi + +# stop yarn daemons if yarn is present +if [ -f "${HADOOP_HDFS_HOME}"/sbin/stop-yarn.sh ]; then + "${HADOOP_HDFS_HOME}"/sbin/stop-yarn.sh --config $HADOOP_CONF_DIR fi