diff --git a/gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/azkaban/AzkabanGobblinYarnAppLauncher.java b/gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/azkaban/AzkabanGobblinYarnAppLauncher.java index 59e7a584af0..8fe09e5a527 100644 --- a/gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/azkaban/AzkabanGobblinYarnAppLauncher.java +++ b/gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/azkaban/AzkabanGobblinYarnAppLauncher.java @@ -80,7 +80,9 @@ public AzkabanGobblinYarnAppLauncher(String jobId, Properties gobblinProps) protected GobblinYarnAppLauncher getYarnAppLauncher(Config gobblinConfig) throws IOException { - return new GobblinYarnAppLauncher(gobblinConfig, this.yarnConfiguration); + GobblinYarnAppLauncher gobblinYarnAppLauncher = new GobblinYarnAppLauncher(gobblinConfig, this.yarnConfiguration); + gobblinYarnAppLauncher.initializeYarnClients(gobblinConfig); + return gobblinYarnAppLauncher; } /** diff --git a/gobblin-yarn/src/main/java/org/apache/gobblin/yarn/GobblinYarnAppLauncher.java b/gobblin-yarn/src/main/java/org/apache/gobblin/yarn/GobblinYarnAppLauncher.java index e4acb8682eb..99c4094df50 100644 --- a/gobblin-yarn/src/main/java/org/apache/gobblin/yarn/GobblinYarnAppLauncher.java +++ b/gobblin-yarn/src/main/java/org/apache/gobblin/yarn/GobblinYarnAppLauncher.java @@ -157,6 +157,10 @@ * this count exceeds the maximum number allowed, it will initiate a shutdown. *
* + *+ * Users of {@link GobblinYarnAppLauncher} need to call {@link #initializeYarnClients} which a child class can override. + *
+ * * @author Yinan Li */ public class GobblinYarnAppLauncher { @@ -260,7 +264,6 @@ public GobblinYarnAppLauncher(Config config, YarnConfiguration yarnConfiguration YarnHelixUtils.setAdditionalYarnClassPath(config, this.yarnConfiguration); this.yarnConfiguration.set("fs.automatic.close", "false"); this.originalYarnRMAddress = this.yarnConfiguration.get(GobblinYarnConfigurationKeys.YARN_RESOURCE_MANAGER_ADDRESS); - createPotentialYarnClients(config, this.potentialYarnClients); this.fs = GobblinClusterUtils.buildFileSystem(config, this.yarnConfiguration); this.closer.register(this.fs); @@ -323,14 +326,14 @@ public GobblinYarnAppLauncher(Config config, YarnConfiguration yarnConfiguration } } - protected void createPotentialYarnClients(Config config, Map