You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Jon Bringhurst (JIRA)" <ji...@apache.org> on 2015/12/07 19:34:11 UTC

[jira] [Created] (HADOOP-12621) Allow shutdown before full YARN_STOP_TIMEOUT has elapsed

Jon Bringhurst created HADOOP-12621:
---------------------------------------

             Summary: Allow shutdown before full YARN_STOP_TIMEOUT has elapsed
                 Key: HADOOP-12621
                 URL: https://issues.apache.org/jira/browse/HADOOP-12621
             Project: Hadoop Common
          Issue Type: Improvement
            Reporter: Jon Bringhurst
            Assignee: Jon Bringhurst


I noticed that yarn-daemon.sh will wait the full time of YARN_STOP_TIMEOUT on shutdown. Here's a snippet from yarn-daemon.sh in release-2.7.1:

{noformat}
    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 $YARN_STOP_TIMEOUT
        if kill -0 $TARGET_PID > /dev/null 2>&1; then
          echo "$command did not stop gracefully after $YARN_STOP_TIMEOUT seconds: killing with kill -9"
          kill -9 $TARGET_PID
        fi
      else
        echo no $command to stop
      fi
      rm -f $pid
    else
      echo no $command to stop
    fi
{noformat}

The script should poll the process rather than wait the entire time.

I'll also dig into trunk to see what the behavior is there.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)