HADOOP-9253. Capture ulimit info in the logs at service start time. Contributed by Arpit Gupta.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1443517 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
35832053bf
commit
54a9c6f964
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -123,7 +123,11 @@ case $startStop in
|
||||
cd "$HADOOP_YARN_HOME"
|
||||
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"
|
||||
sleep 1
|
||||
# capture the ulimit output
|
||||
echo "ulimit -a" >> $log
|
||||
ulimit -a >> $log 2>&1
|
||||
head -30 "$log"
|
||||
;;
|
||||
|
||||
(stop)
|
||||
|
Loading…
Reference in New Issue
Block a user