hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sur...@apache.org
Subject svn commit: r1443525 - in /hadoop/common/branches/branch-1: CHANGES.txt bin/hadoop-daemon.sh
Date Thu, 07 Feb 2013 14:57:30 GMT
Author: suresh
Date: Thu Feb  7 14:57:30 2013
New Revision: 1443525

URL: http://svn.apache.org/viewvc?rev=1443525&view=rev
Log:
HADOOP-9253. Capture ulimit info in the logs at service start time. Contributed by Arpit Gupta.

Modified:
    hadoop/common/branches/branch-1/CHANGES.txt
    hadoop/common/branches/branch-1/bin/hadoop-daemon.sh

Modified: hadoop/common/branches/branch-1/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/CHANGES.txt?rev=1443525&r1=1443524&r2=1443525&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1/CHANGES.txt Thu Feb  7 14:57:30 2013
@@ -61,7 +61,6 @@ Release 1.2.0 - unreleased
     NetworkTopology with NodeGroup and use generic code for choosing datanode
     in Balancer.  (Junping Du via szetszwo)
 
-
     HDFS-4256 Backport concatenation of files into a single file to branch-1
     (sanjay Radia)
 
@@ -169,6 +168,9 @@ Release 1.2.0 - unreleased
     MAPREDUCE-4838. Add additional fields like Locality, Avataar to the 
     JobHistory logs. (Arun C Murthy and Zhijie Shen via sseth)
 
+    HADOOP-9253. Capture ulimit info in the logs at service start time.
+    (Arpit Gupta via suresh)
+
   OPTIMIZATIONS
 
     HDFS-2533. Backport: Remove needless synchronization on some FSDataSet

Modified: hadoop/common/branches/branch-1/bin/hadoop-daemon.sh
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/bin/hadoop-daemon.sh?rev=1443525&r1=1443524&r2=1443525&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/bin/hadoop-daemon.sh (original)
+++ hadoop/common/branches/branch-1/bin/hadoop-daemon.sh Thu Feb  7 14:57:30 2013
@@ -76,7 +76,8 @@ fi
 if [ "$command" == "datanode" ] && [ "$EUID" -eq 0 ] && [ -n "$HADOOP_SECURE_DN_USER"
]; then
   export HADOOP_PID_DIR=$HADOOP_SECURE_DN_PID_DIR
   export HADOOP_LOG_DIR=$HADOOP_SECURE_DN_LOG_DIR
-  export HADOOP_IDENT_STRING=$HADOOP_SECURE_DN_USER   
+  export HADOOP_IDENT_STRING=$HADOOP_SECURE_DN_USER  
+  starting_secure_dn="true"
 fi
 
 if [ "$HADOOP_IDENT_STRING" = "" ]; then
@@ -135,7 +136,17 @@ case $startStop in
     cd "$HADOOP_PREFIX"
     nohup nice -n $HADOOP_NICENESS "$HADOOP_PREFIX"/bin/hadoop --config $HADOOP_CONF_DIR
$command "$@" > "$log" 2>&1 < /dev/null &
     echo $! > $pid
-    sleep 1; head "$log"
+    sleep 1
+    # capture the ulimit output
+    if [ "true" = "$starting_secure_dn" ]; then
+      echo "ulimit -a for secure datanode user $HADOOP_SECURE_DN_USER" >> $log
+      # capture the ulimit info for the appropriate user
+      su --shell=/bin/bash $HADOOP_SECURE_DN_USER -c 'ulimit -a' >> $log 2>&1
+    else
+      echo "ulimit -a for user $USER" >> $log
+      ulimit -a >> $log 2>&1
+    fi
+    head -30 "$log"
     ;;
           
   (stop)



Mime
View raw message