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

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

Github user manuzhang commented on a diff in the pull request:

    https://github.com/apache/incubator-gearpump/pull/133#discussion_r96554802
  
    --- Diff: 
core/src/main/scala/org/apache/gearpump/cluster/client/ClientContext.scala ---
    @@ -75,59 +78,67 @@ class ClientContext(config: Config, sys: ActorSystem, 
_master: ActorRef) {
        * defined. Otherwise, it assumes the jar is on the target runtime 
classpath, thus will
        * not send the jar across the wire.
        */
    -  def submit(app: Application): Int = {
    +  def submit(app: Application): RunningApplication = {
         submit(app, System.getProperty(GEARPUMP_APP_JAR))
       }
     
    -  def submit(app: Application, jar: String): Int = {
    -    submit(app, jar, getExecutorNum())
    +  def submit(app: Application, jar: String): RunningApplication = {
    +    submit(app, jar, getExecutorNum)
       }
     
    -  def submit(app: Application, jar: String, executorNum: Int): Int = {
    -    val client = getMasterClient
    +  def submit(app: Application, jar: String, executorNum: Int): 
RunningApplication = {
         val appName = checkAndAddNamePrefix(app.name, 
System.getProperty(GEARPUMP_APP_NAME_PREFIX))
         val submissionConfig = getSubmissionConfig(config)
           .withValue(APPLICATION_EXECUTOR_NUMBER, 
ConfigValueFactory.fromAnyRef(executorNum))
         val appDescription =
           AppDescription(appName, app.appMaster.getName, app.userConfig, 
submissionConfig)
         val appJar = Option(jar).map(loadFile)
    -    client.submitApplication(appDescription, appJar)
    +    submitApplication(SubmitApplication(appDescription, appJar))
       }
     
    -  private def getExecutorNum(): Int = {
    +  private def getExecutorNum: Int = {
         Try(System.getProperty(APPLICATION_EXECUTOR_NUMBER).toInt).getOrElse(1)
       }
     
       private def getSubmissionConfig(config: Config): Config = {
         ClusterConfig.filterOutDefaultConfig(config)
       }
     
    +  def listApps: AppMastersData = {
    +    ActorUtil.askActor[AppMastersData](master, AppMastersDataRequest, 
masterClientTimeout)
    +  }
    +
    +  @Deprecated
    --- End diff --
    
    If these methods are deprecated, which should be used instead ?


> return application status to client
> -----------------------------------
>
>                 Key: GEARPUMP-252
>                 URL: https://issues.apache.org/jira/browse/GEARPUMP-252
>             Project: Apache Gearpump
>          Issue Type: Improvement
>    Affects Versions: 0.8.2
>            Reporter: Manu Zhang
>            Assignee: Huafeng Wang
>
> Currently, client exits after submitting applications and has no idea of the 
> application status. It will be valuable to return such information to client. 



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

Reply via email to