SLIDER-418 sider version command fails if the config isn't valid

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

Branch: refs/heads/feature/slider_install_package
Commit: a6526a17fe9223bf2d2c347b939bdffdd5c8ffc4
Parents: d6e73cd
Author: Steve Loughran <ste...@apache.org>
Authored: Wed Sep 10 12:13:22 2014 +0100
Committer: Steve Loughran <ste...@apache.org>
Committed: Wed Sep 10 12:13:22 2014 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/slider/client/SliderClient.java | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/a6526a17/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 8d0978c..606a53c 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
@@ -201,11 +201,7 @@ public class SliderClient extends 
AbstractSliderLaunchedService implements RunSe
     addService(yarnClient);
 
     super.serviceInit(conf);
-    
-    //here the superclass is inited; getConfig returns a non-null value
-    sliderFileSystem = new SliderFileSystem(getConfig());
-    YARNRegistryClient =
-      new YARNRegistryClient(yarnClient, getUsername(), getConfig());
+
   }
 
   /**
@@ -298,6 +294,11 @@ public class SliderClient extends 
AbstractSliderLaunchedService implements RunSe
     if (coreAction.getHadoopServicesRequired()) {
       // validate the client
       SliderUtils.validateSliderClientEnvironment(null);
+
+      //here the superclass is inited; getConfig returns a non-null value
+      sliderFileSystem = new SliderFileSystem(getConfig());
+      YARNRegistryClient =
+          new YARNRegistryClient(yarnClient, getUsername(), getConfig());
     }
     int exitCode = EXIT_SUCCESS;
     String clusterName = serviceArgs.getClusterName();

Reply via email to