[
https://issues.apache.org/jira/browse/HADOOP-8650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13429000#comment-13429000
]
Vinay commented on HADOOP-8650:
-------------------------------
In hadoop-daemon.sh already script is there to abruptlty kill the process after
HADOOP_STOP_TIMEOUT
{code}(stop)
if [ -f $pid ]; then
TARGET_PID=`cat $pid`
if kill -0 $TARGET_PID > /dev/null 2>&1; then
echo stopping $command
kill $TARGET_PID
sleep $HADOOP_STOP_TIMEOUT
if kill -0 $TARGET_PID > /dev/null 2>&1; then
echo "$command did not stop gracefully after $HADOOP_STOP_TIMEOUT
seconds: killing with kill -9"
kill -9 $TARGET_PID
fi
else
echo no $command to stop
fi
else
echo no $command to stop
fi
;;{code}
may be we can improve as follows
1. Consider the timeout specified by the *-f <timeout>* option
2. Instead of sleeping for timeout, periodically check for process status in a
loop till timeout, after that issue *kill -9*
> /bin/hadoop-daemon.sh to add "-f <timeout>" arg for forced shutdowns
> ---------------------------------------------------------------------
>
> Key: HADOOP-8650
> URL: https://issues.apache.org/jira/browse/HADOOP-8650
> Project: Hadoop Common
> Issue Type: Improvement
> Affects Versions: 1.0.3, 2.2.0-alpha
> Reporter: Steve Loughran
>
> Add a timeout for the daemon script to trigger a kill -9 if the clean
> shutdown fails.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira