浏览代码

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/branches/branch-1@1455320 13f79535-47bb-0310-9956-ffa450edef68
Suresh Srinivas 12 年之前
父节点
当前提交
e5e6f20766
共有 2 个文件被更改,包括 4 次插入1 次删除
  1. 3 0
      CHANGES.txt
  2. 1 1
      bin/hadoop-daemon.sh

+ 3 - 0
CHANGES.txt

@@ -531,6 +531,9 @@ Release 1.2.0 - unreleased
 
 
     HDFS-4558. Fix the NPE thrown when starting balancer.  (Junping Du via szetszwo)
     HDFS-4558. Fix the NPE thrown when starting balancer.  (Junping Du via szetszwo)
 
 
+    HADOOP-9379. capture the ulimit info after printing the log to the console.
+    (Arpit Gupta via suresh)
+
 Release 1.1.2 - 2013.01.30
 Release 1.1.2 - 2013.01.30
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 1 - 1
bin/hadoop-daemon.sh

@@ -137,6 +137,7 @@ case $startStop in
     nohup nice -n $HADOOP_NICENESS "$HADOOP_PREFIX"/bin/hadoop --config $HADOOP_CONF_DIR $command "$@" > "$log" 2>&1 < /dev/null &
     nohup nice -n $HADOOP_NICENESS "$HADOOP_PREFIX"/bin/hadoop --config $HADOOP_CONF_DIR $command "$@" > "$log" 2>&1 < /dev/null &
     echo $! > $pid
     echo $! > $pid
     sleep 1
     sleep 1
+    head "$log"
     # capture the ulimit output
     # capture the ulimit output
     if [ "true" = "$starting_secure_dn" ]; then
     if [ "true" = "$starting_secure_dn" ]; then
       echo "ulimit -a for secure datanode user $HADOOP_SECURE_DN_USER" >> $log
       echo "ulimit -a for secure datanode user $HADOOP_SECURE_DN_USER" >> $log
@@ -146,7 +147,6 @@ case $startStop in
       echo "ulimit -a for user $USER" >> $log
       echo "ulimit -a for user $USER" >> $log
       ulimit -a >> $log 2>&1
       ulimit -a >> $log 2>&1
     fi
     fi
-    head -30 "$log"
     ;;
     ;;
           
           
   (stop)
   (stop)