Repository: incubator-slider Updated Branches: refs/heads/develop 8b32aa17a -> 7c95d5b05
SLIDER-381 Slider-client exists command does not report status correctly Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/7c95d5b0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/7c95d5b0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/7c95d5b0 Branch: refs/heads/develop Commit: 7c95d5b059045cc01fa9756308f50e01644abb2d Parents: 8b32aa1 Author: Steve Loughran <ste...@apache.org> Authored: Wed Sep 10 18:04:18 2014 +0100 Committer: Steve Loughran <ste...@apache.org> Committed: Wed Sep 10 18:04:18 2014 +0100 ---------------------------------------------------------------------- .../java/org/apache/slider/client/SliderClient.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/7c95d5b0/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 ef0e63c..7c1fd1e 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 @@ -1623,10 +1623,10 @@ public class SliderClient extends AbstractSliderLaunchedService implements RunSe * @return exit code */ @VisibleForTesting - public int actionExists(String name, boolean live) throws YarnException, IOException { + public int actionExists(String name, boolean checkLive) throws YarnException, IOException { verifyBindingsDefined(); SliderUtils.validateClusterName(name); - log.debug("actionExists({}, {})", name, live); + log.debug("actionExists({}, {})", name, checkLive); //initial probe for a cluster in the filesystem Path clusterDirectory = sliderFileSystem.buildClusterDirPath(name); @@ -1636,10 +1636,10 @@ public class SliderClient extends AbstractSliderLaunchedService implements RunSe //test for liveness if desired - if (live) { + if (checkLive) { ApplicationReport instance = findInstance(name); if (instance == null) { - log.info("cluster {} not running", name); + log.info("Cluster {} not running", name); return EXIT_FALSE; } else { // the app exists, but it may be in a terminated state @@ -1653,11 +1653,10 @@ public class SliderClient extends AbstractSliderLaunchedService implements RunSe log.debug("State {}", report); return EXIT_FALSE; } - log.info("Cluster {} is running:\n{}", name, report); + log.info("Cluster {} is live:\n{}", name, report); } } else { - log.info("Cluster {} exists but is not running", name); - + log.info("Cluster {} exists", name); } return EXIT_SUCCESS; }