flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tillrohrmann <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-2111] Add "stop" signal to cleanly shut...
Date Thu, 11 Feb 2016 13:05:59 GMT
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/750#discussion_r52598306
  
    --- Diff: flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
---
    @@ -464,6 +464,33 @@ class JobManager(
               )
           }
     
    +    case StopJob(jobID) =>
    +      log.info(s"Trying to stop job with ID $jobID.")
    +
    +      currentJobs.get(jobID) match {
    +        case Some((executionGraph, _)) =>
    +          try {
    +            if (!executionGraph.isStoppable()) {
    +              sender ! StoppingFailure(jobID, new IllegalStateException(s"Job with ID
$jobID" +
    +                " is not stoppable."))
    +            } else if(executionGraph.getState() != JobStatus.CREATED
    +                && executionGraph.getState() != JobStatus.RUNNING
    +                && executionGraph.getState() != JobStatus.RESTARTING) {
    +              sender ! StoppingFailure(jobID, new IllegalStateException(s"Job with ID
$jobID" +
    --- End diff --
    
    Maybe we could say what the current state of the job is and that it cannot be stopped
because of that.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message