Github user manuzhang commented on a diff in the pull request: https://github.com/apache/incubator-gearpump/pull/134#discussion_r97216867 --- Diff: core/src/main/scala/org/apache/gearpump/cluster/master/AppManager.scala --- @@ -305,50 +312,41 @@ private[cluster] class AppManager(kvService: ActorRef, launcher: AppMasterLaunch val appId = state.appId if (appMasterRestartPolicies.get(appId).get.allowRestart) { LOG.info(s"AppManager Recovering Application $appId...") - activeAppMasters -= appId kvService ! PutKV(MASTER_GROUP, MASTER_STATE, - MasterState(this.nextAppId, appMasterRegistry, activeAppMasters, deadAppMasters)) - context.actorOf(launcher.props(appId, EXECUTOR_ID, state.app, state.jar, state.username, - context.parent, None), s"launcher${appId}_${Util.randInt()}") + MasterState(this.nextAppId, applicationRegistry)) + context.actorOf(launcher.props(appId, APPMASTER_DEFAULT_EXECUTOR_ID, state.app, state.jar, + state.username, context.parent, None), s"launcher${appId}_${Util.randInt()}") } else { LOG.error(s"Application $appId failed too many times") } } - case class RecoverApplication(applicationStatus: ApplicationState) - - private def cleanApplicationData(appId: Int): Unit = { - if (appMasterRegistry.contains(appId)) { - // Add the dead app to dead appMasters - deadAppMasters += appId - // Remove the dead app from active appMasters - activeAppMasters -= appId - - appMasterRegistry += appId -> { - val (ref, info) = appMasterRegistry(appId) - (ref, info.copy(finishTime = System.currentTimeMillis())) - } - kvService ! PutKV(MASTER_GROUP, MASTER_STATE, - MasterState(this.nextAppId, appMasterRegistry, activeAppMasters, deadAppMasters)) - kvService ! DeleteKVGroup(appId.toString) - } + private def killAppMasterExecutor(appId: Int, worker: ActorRef): Unit = { --- End diff -- `AppMasterExecutor` is confusing. I think `killAppMaster` will do
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---