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.



---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to