[
https://issues.apache.org/jira/browse/GEARPUMP-252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15834006#comment-15834006
]
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/134#discussion_r97263634
--- Diff:
core/src/main/scala/org/apache/gearpump/cluster/appmaster/ApplicationRuntimeInfo.scala
---
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.gearpump.cluster.appmaster
+
+import akka.actor.ActorRef
+import com.typesafe.config.{Config, ConfigFactory}
+import org.apache.gearpump.TimeStamp
+import org.apache.gearpump.cluster.{ApplicationStatus,
ApplicationTerminalStatus}
+
+/** Run time info of Application */
+case class ApplicationRuntimeInfo(
+ appId: Int,
+ // AppName is the unique Id for an application
+ appName: String,
+ appMaster: ActorRef = ActorRef.noSender,
+ worker: ActorRef = ActorRef.noSender,
+ user: String = "",
+ submissionTime: TimeStamp = 0,
+ startTime: TimeStamp = 0,
+ finishTime: TimeStamp = 0,
+ config: Config = ConfigFactory.empty(),
+ status: ApplicationStatus = ApplicationStatus.NOEXIST) {
+
+ def onAppMasterRegistered(appMaster: ActorRef, worker: ActorRef):
ApplicationRuntimeInfo = {
+ this.copy(appMaster = appMaster, worker = worker)
+ }
+
+ def onAppMasterActivated(timeStamp: TimeStamp): ApplicationRuntimeInfo =
{
+ this.copy(startTime = timeStamp, status = ApplicationStatus.ACTIVE)
+ }
+
+ def onTerminalStatus(timeStamp: TimeStamp, finalStatus:
ApplicationTerminalStatus):
--- End diff --
`terminal` or `final` ?
> 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)