SLIDER-536 slider delete operation logs too much

Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/272d742c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/272d742c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/272d742c

Branch: refs/heads/develop
Commit: 272d742cd2cca67dc9d19716fb10da1bc19aefe2
Parents: 3da97bd
Author: Steve Loughran <[email protected]>
Authored: Thu Oct 16 11:37:14 2014 -0700
Committer: Steve Loughran <[email protected]>
Committed: Thu Oct 16 11:37:57 2014 -0700

----------------------------------------------------------------------
 .../org/apache/slider/client/SliderClient.java  | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/272d742c/slider-core/src/main/java/org/apache/slider/client/SliderClient.java
----------------------------------------------------------------------
diff --git 
a/slider-core/src/main/java/org/apache/slider/client/SliderClient.java 
b/slider-core/src/main/java/org/apache/slider/client/SliderClient.java
index 7c73394..da3b913 100644
--- a/slider-core/src/main/java/org/apache/slider/client/SliderClient.java
+++ b/slider-core/src/main/java/org/apache/slider/client/SliderClient.java
@@ -509,14 +509,14 @@ public class SliderClient extends 
AbstractSliderLaunchedService implements RunSe
     // delete the directory;
     boolean exists = sliderFileSystem.getFileSystem().exists(clusterDirectory);
     if (exists) {
-      log.info("Application Instance {} found at {}: destroying", clustername, 
clusterDirectory);
+      log.debug("Application Instance {} found at {}: destroying", 
clustername, clusterDirectory);
+      boolean deleted =
+          sliderFileSystem.getFileSystem().delete(clusterDirectory, true);
+      if (!deleted) {
+        log.warn("Filesystem returned false from delete() operation");
+      }
     } else {
-      log.info("Application Instance {} already destroyed", clustername);
-    }
-    boolean deleted =
-      sliderFileSystem.getFileSystem().delete(clusterDirectory, true);
-    if (!deleted) {
-      log.warn("Filesystem returned false from delete() operation");
+      log.debug("Application Instance {} already destroyed", clustername);
     }
 
     // rm the registry entry —do not let this block the destroy operations
@@ -525,7 +525,7 @@ public class SliderClient extends 
AbstractSliderLaunchedService implements RunSe
     try {
       getRegistryOperations().delete(registryPath, true);
     } catch (IOException e) {
-      log.warn("Error deleting {}: {} ", registryPath, e, e);
+      log.warn("Error deleting registry entry {}: {} ", registryPath, e, e);
     } catch (SliderException e) {
       log.warn("Error binding to registry {} ", e, e);
     }
@@ -856,14 +856,14 @@ public class SliderClient extends 
AbstractSliderLaunchedService implements RunSe
       String createDefaultZkNode = 
appConf.getGlobalOptions().getOption(AgentKeys.CREATE_DEF_ZK_NODE, "false");
       if (createDefaultZkNode.equals("true")) {
         String defaultZKPath = createZookeeperNode(clustername, false);
-        log.info("ZK node created for application instance: {}.", 
defaultZKPath);
+        log.debug("ZK node created for application instance: {}", 
defaultZKPath);
         if (defaultZKPath != null) {
           zkPaths.setAppPath(defaultZKPath);
         }
       } else {
         // create AppPath if default is being used
         String defaultZKPath = createZookeeperNode(clustername, true);
-        log.info("ZK node assigned to application instance: {}.", 
defaultZKPath);
+        log.debug("ZK node assigned to application instance: {}", 
defaultZKPath);
         zkPaths.setAppPath(defaultZKPath);
       }
     }

Reply via email to