hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Bringhurst (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HADOOP-12621) Allow shutdown before full YARN_STOP_TIMEOUT has elapsed
Date Mon, 07 Dec 2015 18:34:11 GMT
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)

Mime
View raw message