gearpump-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manuzhang <...@git.apache.org>
Subject [GitHub] incubator-gearpump pull request #134: [GEARPUMP-265] remove AppMasterRuntime...
Date Sun, 22 Jan 2017 08:41:20 GMT
Github user manuzhang commented on a diff in the pull request:

    https://github.com/apache/incubator-gearpump/pull/134#discussion_r97216725
  
    --- Diff: core/src/main/scala/org/apache/gearpump/cluster/appmaster/ApplicationRuntimeInfo.scala
---
    @@ -19,20 +19,34 @@
     package org.apache.gearpump.cluster.appmaster
     
     import akka.actor.ActorRef
    -import com.typesafe.config.Config
    +import com.typesafe.config.{Config, ConfigFactory}
    +import org.apache.gearpump.TimeStamp
    +import org.apache.gearpump.cluster.ApplicationStatus
     
    -import org.apache.gearpump._
    -import org.apache.gearpump.cluster.AppMasterRegisterData
    -
    -/** Run time info used to start an AppMaster */
    -case class AppMasterRuntimeInfo(
    +/** Run time info of Application */
    +case class ApplicationRuntimeInfo(
         appId: Int,
         // AppName is the unique Id for an application
         appName: String,
    -    worker: ActorRef = null,
    -    user: String = null,
    +    appMaster: ActorRef = ActorRef.noSender,
    +    worker: ActorRef = ActorRef.noSender,
    +    user: String = "",
         submissionTime: TimeStamp = 0,
         startTime: TimeStamp = 0,
         finishTime: TimeStamp = 0,
    -    config: Config = null)
    -  extends AppMasterRegisterData
    +    config: Config = ConfigFactory.empty(),
    +    status: ApplicationStatus = ApplicationStatus.Nonexist) {
    +
    +  def onAppMasterRegister(appMaster: ActorRef, worker: ActorRef): ApplicationRuntimeInfo
= {
    +    this.copy(appMaster = appMaster, worker = worker)
    +  }
    +
    +  def onActived(timeStamp: TimeStamp): ApplicationRuntimeInfo = {
    --- End diff --
    
    I think the verb is `Activate` 


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