Author: suresh Date: Thu Feb 7 14:52:58 2013 New Revision: 1443517 URL: http://svn.apache.org/viewvc?rev=1443517&view=rev Log: HADOOP-9253. Capture ulimit info in the logs at service start time. Contributed by Arpit Gupta.
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1443517&r1=1443516&r2=1443517&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt (original) +++ hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt Thu Feb 7 14:52:58 2013 @@ -348,6 +348,8 @@ Release 2.0.4-beta - UNRELEASED HADOOP-9283. Add support for running the Hadoop client on AIX. (atm) IMPROVEMENTS + HADOOP-9253. Capture ulimit info in the logs at service start time. + (Arpit Gupta via suresh) OPTIMIZATIONS Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh?rev=1443517&r1=1443516&r2=1443517&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh (original) +++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh Thu Feb 7 14:52:58 2013 @@ -83,7 +83,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 @@ -154,7 +155,17 @@ case $startStop in ;; esac 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" sleep 3; if ! ps -p $! > /dev/null ; then exit 1