gearpump-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From huafengw <...@git.apache.org>
Subject [GitHub] incubator-gearpump pull request #134: [GEARPUMP-252] return application stat...
Date Mon, 23 Jan 2017 10:19:37 GMT
Github user huafengw commented on a diff in the pull request:

    https://github.com/apache/incubator-gearpump/pull/134#discussion_r97287682
  
    --- Diff: core/src/main/scala/org/apache/gearpump/cluster/client/RunningApplication.scala
---
    @@ -40,6 +44,16 @@ class RunningApplication(val appId: Int, master: ActorRef, timeout:
Timeout) {
         }
       }
     
    +  def waitUnilFinish(): Unit = {
    +    val delegator = system.actorOf(Props(new AppResultListener(appId, master)))
    +    val result = ActorUtil.askActor[ApplicationResult](delegator, WaitUntilFinish, INF_TIMEOUT)
    +    result match {
    +      case failed: ApplicationFailed =>
    +        throw failed.error
    +      case _ =>
    +    }
    +  }
    +
       def askAppMaster[T](msg: Any): Future[T] = {
    --- End diff --
    
    The ActorUtil's askAppMaster will first `ResolveAppId` which is unnecessary here.


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