Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/14185#discussion_r70730228
--- Diff:
launcher/src/main/java/org/apache/spark/launcher/SparkLauncher.java ---
@@ -418,14 +414,26 @@ public SparkAppHandle
startApplication(SparkAppHandle.Listener... listeners) thr
}
}
- String loggerPrefix = getClass().getPackage().getName();
- String loggerName = String.format("%s.app.%s", loggerPrefix, appName);
- ProcessBuilder pb = createBuilder().redirectErrorStream(true);
+ ProcessBuilder pb = createProcessBuilder().redirectErrorStream(true);
+ return startApplication(appName, pb, listeners);
+ }
+
+ public SparkAppHandle startApplication(String appName, ProcessBuilder pb,
+ SparkAppHandle.Listener...
listeners) throws IOException {
+ ChildProcAppHandle handle = LauncherServer.newAppHandle();
+ for (SparkAppHandle.Listener l : listeners) {
+ handle.addListener(l);
+ }
+
pb.environment().put(LauncherProtocol.ENV_LAUNCHER_PORT,
String.valueOf(LauncherServer.getServerInstance().getPort()));
pb.environment().put(LauncherProtocol.ENV_LAUNCHER_SECRET,
handle.getSecret());
+
+ String loggerPrefix = getClass().getPackage().getName();
+ String loggerName = String.format("%s.app.%s", loggerPrefix, appName);
try {
- handle.setChildProc(pb.start(), loggerName);
+ Process proc = pb.start();
--- End diff --
This change is not necessary.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]