flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mxm <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-3544] Introduce ResourceManager compone...
Date Mon, 21 Mar 2016 18:10:48 GMT
Github user mxm commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1741#discussion_r56869070
  
    --- Diff: flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
---
    @@ -886,10 +957,42 @@ class JobManager(
           if (instanceManager.isRegistered(taskManager)) {
             log.info(s"Task manager ${taskManager.path} wants to disconnect, because $msg.")
     
    -        instanceManager.unregisterTaskManager(taskManager, false)
    +          instanceManager.unregisterTaskManager(taskManager, false)
             context.unwatch(taskManager)
           }
     
    +    case msg: StopCluster =>
    +
    +      log.info(s"Stopping JobManager with final application status ${msg.finalStatus()}
" +
    +        s"and diagnostics: ${msg.message()}")
    +
    +      val respondTo = sender()
    +
    +      // stop all task managers
    +      instanceManager.getAllRegisteredInstances.asScala foreach {
    +        instance =>
    +          instance.getActorGateway.tell(msg)
    +      }
    +
    +      // send resource manager the ok
    +      currentResourceManager match {
    +        case Some(rm) =>
    +
    +          // inform rm
    +          rm ! decorateMessage(msg)
    +
    +          respondTo ! decorateMessage(StopClusterSuccessful.get())
    +
    +          // trigger shutdown
    +          shutdown()
    +
    +        case None =>
    +          // retry
    +          context.system.scheduler.scheduleOnce(
    +            2 seconds, self, decorateMessage(msg)
    +          )(context.dispatcher)
    --- End diff --
    
    You're right. There should be an upper bound for the number of retries. If there was never
a RM, then is behaves the same.


---
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