keith-turner commented on a change in pull request #1052: Issue 1003 - Refactor 
remove and init apis to check if running
URL: https://github.com/apache/fluo/pull/1052#discussion_r223740969
 
 

 ##########
 File path: modules/command/src/main/java/org/apache/fluo/command/FluoInit.java
 ##########
 @@ -134,65 +135,60 @@ public static void main(String[] args) {
 
     try (FluoAdminImpl admin = new FluoAdminImpl(config)) {
 
-      if (admin.applicationRunning()) {
-        System.err.println("Error - The Fluo '" + config.getApplicationName() 
+ "' application"
-            + " is already running and must be stopped before running 'fluo 
init'. "
-            + " Aborted initialization.");
-        System.exit(-1);
-      }
-
       FluoAdmin.InitializationOptions initOpts = new 
FluoAdmin.InitializationOptions();
 
       if (opts.getUpdate()) {
         System.out.println("Updating configuration for the Fluo '" + 
config.getApplicationName()
             + "' application in Zookeeper using " + opts.getAppPropsPath());
-        admin.updateSharedConfig();
-        System.out.println("Update is complete.");
-        System.exit(0);
-      }
-
-      if (opts.getForce()) {
-        initOpts.setClearZookeeper(true).setClearTable(true);
+        initOpts.setUpdateWithoutInitializing(true);
 
 Review comment:
   > I can add an applicationRunning() check to the beginning of 
updateSharedConfiguration(). Do we want to limit calling that method on only 
stopped applications?
   
   Yes, I think that makes sense because it avoids the issue of workers running 
with different config.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to