Browse Source

HADOOP-9379. capture the ulimit info after printing the log to the console. (Arpit Gupta via suresh)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1455519 13f79535-47bb-0310-9956-ffa450edef68
Thomas Graves 12 years ago
parent
commit
69f964643a

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -40,6 +40,9 @@ Release 0.23.7 - UNRELEASED
     the message is printed and the stack trace is not printed to avoid chatter.
     (Brandon Li via Suresh)
 
+    HADOOP-9379. capture the ulimit info after printing the log to the 
+    console. (Arpit Gupta via suresh)
+
   OPTIMIZATIONS
 
     HADOOP-9147. Add missing fields to FIleStatus.toString.

+ 1 - 1
hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh

@@ -154,6 +154,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
@@ -163,7 +164,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

+ 1 - 1
hadoop-yarn-project/hadoop-yarn/bin/yarn-daemon.sh

@@ -123,10 +123,10 @@ case $startStop in
     nohup nice -n $YARN_NICENESS "$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)