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

ASF GitHub Bot commented on EAGLE-432:
--------------------------------------

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

    https://github.com/apache/incubator-eagle/pull/412#discussion_r77945175
  
    --- Diff: 
eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/service/impl/ApplicationManagementServiceImpl.java
 ---
    @@ -112,14 +112,41 @@ public ApplicationEntity 
uninstall(ApplicationOperations.UninstallOperation oper
             ApplicationContext applicationContext = new ApplicationContext(
                     
applicationProviderService.getApplicationProviderByType(applicationEntity.getDescriptor().getType()).getApplication(),
                     applicationEntity,config, alertMetadataService);
    -        // TODO: Check status, skip stop if already STOPPED
    +        // TODO: Check status
             try {
    -            applicationContext.onStop();
    +            ApplicationEntity.Status status = 
applicationEntity.getStatus();
    +            switch (status){
    +                case STARTING: {
    +                    LOGGER.info("application is starting, please try it 
latter");
    --- End diff --
    
    Hi @haoch, I haven't come up with a good solution for "wrong status" case.
    For example, if a topology is in "starting" process (this status change is 
triggered by user), but somehow this   topology has never been started in 
storm. In such case, "status" in applicationEntity will never be updated 
through "background status update task".  
    
    Possible solutions are : 
    1. Add a check function which is to update status after "starting" or 
"stopping", and once failed it will retry until it reaches certain times or the 
storm toppology status become "active" or "inactive".
       -This solution add more code complexity 
    2. Or I can remove the "Stopping", "starting", and only keep "installed", 
"Inactive", "Active".
      - This is much easier. Complex situations like mentioned before doesn't 
matter.
    
    
    Or I can just keep status : "Active, Inactive" for topology, which is much 
easier and straight forward.



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

Reply via email to