From 5865ec1c37741933a6a0467294323e1119e2a520 Mon Sep 17 00:00:00 2001 From: Suresh Srinivas Date: Mon, 11 Mar 2013 20:31:17 +0000 Subject: [PATCH] HADOOP-9379. capture the ulimit info after printing the log to the console. Contributed by Arpit Gupta. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1455316 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../hadoop-common/src/main/bin/hadoop-daemon.sh | 2 +- hadoop-yarn-project/hadoop-yarn/bin/yarn-daemon.sh | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 78197c6ba9..8023e13292 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -542,6 +542,9 @@ Release 2.0.5-beta - UNRELEASED HADOOP-9369. DNS#reverseDns() can return hostname with . appended at the end. (Karthik Kambatla via atm) + HADOOP-9379. capture the ulimit info after printing the log to the + console. (Arpit Gupta via suresh) + Release 2.0.4-alpha - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh index bf03d195e0..ece40eff24 100755 --- a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh +++ b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh @@ -156,6 +156,7 @@ case $startStop in esac echo $! > $pid sleep 1 + head "$log" # capture the ulimit output if [ "true" = "$starting_secure_dn" ]; then echo "ulimit -a for secure datanode user $HADOOP_SECURE_DN_USER" >> $log @@ -165,7 +166,6 @@ case $startStop in echo "ulimit -a for user $USER" >> $log ulimit -a >> $log 2>&1 fi - head -30 "$log" sleep 3; if ! ps -p $! > /dev/null ; then exit 1 diff --git a/hadoop-yarn-project/hadoop-yarn/bin/yarn-daemon.sh b/hadoop-yarn-project/hadoop-yarn/bin/yarn-daemon.sh index de670facfa..527ae42cfd 100644 --- a/hadoop-yarn-project/hadoop-yarn/bin/yarn-daemon.sh +++ b/hadoop-yarn-project/hadoop-yarn/bin/yarn-daemon.sh @@ -124,10 +124,10 @@ case $startStop in nohup nice -n $YARN_NICENESS "$HADOOP_YARN_HOME"/bin/yarn --config $YARN_CONF_DIR $command "$@" > "$log" 2>&1 < /dev/null & echo $! > $pid sleep 1 + head "$log" # capture the ulimit output echo "ulimit -a" >> $log ulimit -a >> $log 2>&1 - head -30 "$log" ;; (stop)