You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by go...@apache.org on 2016/02/22 23:07:24 UTC
incubator-slider git commit: SLIDER-1089 Slider client should print
out applicationId before submit Yarn application (shanyu zhao via gourksaha)
Repository: incubator-slider
Updated Branches:
refs/heads/develop 070a0af38 -> 474cce284
SLIDER-1089 Slider client should print out applicationId before submit Yarn application (shanyu zhao via gourksaha)
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/474cce28
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/474cce28
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/474cce28
Branch: refs/heads/develop
Commit: 474cce284a9516e6660c66bba01e0721cd1b8f4a
Parents: 070a0af
Author: Gour Saha <go...@apache.org>
Authored: Mon Feb 22 14:06:34 2016 -0800
Committer: Gour Saha <go...@apache.org>
Committed: Mon Feb 22 14:06:34 2016 -0800
----------------------------------------------------------------------
.../org/apache/slider/client/SliderClient.java | 53 ++++++++++++--------
1 file changed, 33 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/474cce28/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 d2c1cd3..cf15dfc 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
@@ -899,7 +899,7 @@ public class SliderClient extends AbstractSliderLaunchedService implements RunSe
return true;
}
- private static void checkForCredentials(Configuration conf,
+ protected static void checkForCredentials(Configuration conf,
ConfTree tree) throws IOException {
if (tree.credentials == null || tree.credentials.isEmpty()) {
log.info("No credentials requested");
@@ -1783,7 +1783,7 @@ public class SliderClient extends AbstractSliderLaunchedService implements RunSe
* @throws YarnException
* @throws IOException
*/
- private int startCluster(String clustername,
+ protected int startCluster(String clustername,
LaunchArgsAccessor launchArgs) throws
YarnException,
IOException {
@@ -1795,7 +1795,6 @@ public class SliderClient extends AbstractSliderLaunchedService implements RunSe
LaunchedApplication launchedApplication =
launchApplication(clustername, clusterDirectory, instanceDefinition,
serviceArgs.isDebug());
- applicationId = launchedApplication.getApplicationId();
if (launchArgs.getOutputFile() != null) {
// output file has been requested. Get the app report and serialize it
@@ -1863,23 +1862,11 @@ public class SliderClient extends AbstractSliderLaunchedService implements RunSe
}
- /**
- *
- * @param clustername name of the cluster
- * @param clusterDirectory cluster dir
- * @param instanceDefinition the instance definition
- * @param debugAM enable debug AM options
- * @return the launched application
- * @throws YarnException
- * @throws IOException
- */
- public LaunchedApplication launchApplication(String clustername,
- Path clusterDirectory,
- AggregateConf instanceDefinition,
- boolean debugAM)
- throws YarnException, IOException {
-
-
+ protected AppMasterLauncher setupAppMasterLauncher(String clustername,
+ Path clusterDirectory,
+ AggregateConf instanceDefinition,
+ boolean debugAM)
+ throws YarnException, IOException{
deployedClusterName = clustername;
validateClusterName(clustername);
verifyNoLiveClusters(clustername, "Launch");
@@ -2205,6 +2192,32 @@ public class SliderClient extends AbstractSliderLaunchedService implements RunSe
if (isSet(amQueue)) {
amLauncher.setQueue(amQueue);
}
+ return amLauncher;
+ }
+
+ /**
+ *
+ * @param clustername name of the cluster
+ * @param clusterDirectory cluster dir
+ * @param instanceDefinition the instance definition
+ * @param debugAM enable debug AM options
+ * @return the launched application
+ * @throws YarnException
+ * @throws IOException
+ */
+ public LaunchedApplication launchApplication(String clustername,
+ Path clusterDirectory,
+ AggregateConf instanceDefinition,
+ boolean debugAM)
+ throws YarnException, IOException {
+
+ AppMasterLauncher amLauncher = setupAppMasterLauncher(clustername,
+ clusterDirectory,
+ instanceDefinition,
+ debugAM);
+
+ applicationId = amLauncher.getApplicationId();
+ log.info("Submitting application {}", applicationId);
// submit the application
LaunchedApplication launchedApplication = amLauncher.submitApplication();