[ 
https://issues.apache.org/jira/browse/GEARPUMP-265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15833373#comment-15833373
 ] 

ASF GitHub Bot commented on GEARPUMP-265:
-----------------------------------------

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


> remove AppMasterRuntimeInfo from AppMasterContext
> -------------------------------------------------
>
>                 Key: GEARPUMP-265
>                 URL: https://issues.apache.org/jira/browse/GEARPUMP-265
>             Project: Apache Gearpump
>          Issue Type: Sub-task
>    Affects Versions: 0.8.2
>            Reporter: Huafeng Wang
>




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

Reply via email to