[
https://issues.apache.org/jira/browse/EAGLE-432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15470508#comment-15470508
]
ASF GitHub Bot commented on EAGLE-432:
--------------------------------------
Github user haoch commented on a diff in the pull request:
https://github.com/apache/incubator-eagle/pull/412#discussion_r77813044
--- Diff:
eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/resource/ApplicationResource.java
---
@@ -18,24 +18,55 @@
import com.google.inject.Inject;
+import com.typesafe.config.Config;
+import com.typesafe.config.ConfigFactory;
import org.apache.eagle.app.service.ApplicationManagementService;
import org.apache.eagle.app.service.ApplicationOperations;
import org.apache.eagle.app.service.ApplicationProviderService;
import org.apache.eagle.metadata.model.ApplicationDesc;
import org.apache.eagle.metadata.model.ApplicationEntity;
import org.apache.eagle.metadata.resource.RESTResponse;
import org.apache.eagle.metadata.service.ApplicationEntityService;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import java.util.Collection;
+import static
org.apache.eagle.metadata.utils.HttpRequest.httpGetWithoutCredentials;
+
@Path("/apps")
public class ApplicationResource {
+ private final static Logger LOG =
LoggerFactory.getLogger(ApplicationResource.class);
+
private final ApplicationProviderService providerService;
private final ApplicationManagementService
applicationManagementService;
private final ApplicationEntityService entityService;
+ private ApplicationEntity.Status extractStatus(JSONObject response,
String appUuid) {
--- End diff --
No logic code should exist in web resource class (`Controller`), push down
business logic into `Service` .
> Application status monitoring
> -----------------------------
>
> Key: EAGLE-432
> URL: https://issues.apache.org/jira/browse/EAGLE-432
> Project: Eagle
> Issue Type: Improvement
> Affects Versions: v0.5.0
> Reporter: Edward Zhang
> Assignee: DanielZhou
> Fix For: v0.5.0
>
>
> App framework needs to probe application status periodically or on demand.
> ApplicationEntity contains status field, and this field's value should come
> from physical storm applications.
> We can start background threads to check application status or on-demand.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)