You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by st...@apache.org on 2014/10/09 00:53:03 UTC
[14/50] [abbrv] git commit: SLIDER-149 fix a couple of regressions
that showed up in testing ... this branch got out of sync with develop
SLIDER-149 fix a couple of regressions that showed up in testing ... this branch got out of sync with develop
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/dbd1d3d2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/dbd1d3d2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/dbd1d3d2
Branch: refs/heads/develop
Commit: dbd1d3d2dfda673c8db2792a457ab2cfb3930d65
Parents: 8a48c80
Author: Steve Loughran <st...@apache.org>
Authored: Wed Sep 17 22:20:31 2014 +0100
Committer: Steve Loughran <st...@apache.org>
Committed: Wed Sep 17 22:20:31 2014 +0100
----------------------------------------------------------------------
.../main/java/org/apache/slider/client/SliderClient.java | 6 ++----
.../org/apache/slider/core/registry/YarnAppListClient.java | 9 ++++++++-
2 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/dbd1d3d2/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 8c07c5d..93050a5 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
@@ -217,10 +217,6 @@ public class SliderClient extends AbstractSliderLaunchedService implements RunSe
super.serviceInit(conf);
- //here the superclass is inited; getConfig returns a non-null value
- sliderFileSystem = new SliderFileSystem(getConfig());
- YarnAppListClient =
- new YarnAppListClient(yarnClient, getUsername(), getConfig());
}
/**
@@ -383,6 +379,8 @@ public class SliderClient extends AbstractSliderLaunchedService implements RunSe
yarnClient.start();
}
addService(yarnClient);
+ YarnAppListClient =
+ new YarnAppListClient(yarnClient, getUsername(), getConfig());
// create the filesystem
sliderFileSystem = new SliderFileSystem(getConfig());
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/dbd1d3d2/slider-core/src/main/java/org/apache/slider/core/registry/YarnAppListClient.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/core/registry/YarnAppListClient.java b/slider-core/src/main/java/org/apache/slider/core/registry/YarnAppListClient.java
index 0ca0518..068b687 100644
--- a/slider-core/src/main/java/org/apache/slider/core/registry/YarnAppListClient.java
+++ b/slider-core/src/main/java/org/apache/slider/core/registry/YarnAppListClient.java
@@ -18,6 +18,7 @@
package org.apache.slider.core.registry;
+import com.google.common.base.Preconditions;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.api.records.ApplicationReport;
import org.apache.hadoop.yarn.exceptions.YarnException;
@@ -40,6 +41,13 @@ public class YarnAppListClient {
public YarnAppListClient(SliderYarnClientImpl yarnClient,
String username,
Configuration conf) {
+
+ Preconditions.checkArgument(yarnClient != null,
+ "yarn client is null: is app inited?");
+ Preconditions.checkArgument(username != null,
+ "username is null");
+ Preconditions.checkArgument(conf != null,
+ "conf parameter is null");
this.yarnClient = yarnClient;
this.username = username;
this.conf = conf;
@@ -54,7 +62,6 @@ public class YarnAppListClient {
*/
public List<ApplicationReport> findAllLiveInstances(String appname)
throws YarnException, IOException {
-
return yarnClient.findAllLiveInstances(username, appname);
}