Github user tgravescs commented on a diff in the pull request:
https://github.com/apache/spark/pull/15009#discussion_r100318547
--- Diff:
launcher/src/main/java/org/apache/spark/launcher/package-info.java ---
@@ -49,6 +49,38 @@
* </pre>
*
* <p>
+ * Currently, for currently while launching spark application with
+ * {@link org.apache.spark.launcher.SparkLauncher#startApplication(
+ * org.apache.spark.launcher.SparkAppHandle.Listener...)}, there are two
options available
+ * for YARN manager in cluster deploy mode:
+ * - to launch Spark Application as a Thread inside current JVM using
+ * the {@link
org.apache.spark.launcher.SparkLauncher#launchAsThread(boolean)}
+ * - to request application be killed if launcher process exits using
+ * the {@link
org.apache.spark.launcher.SparkLauncher#stopIfLauncherShutdown()}.
+ * </p>
+ *
+ * <pre>
+ * {@code
+ * import org.apache.spark.launcher.SparkAppHandle;
+ * import org.apache.spark.launcher.SparkLauncher;`
+ *
+ * public class MyLauncher {
+ * public static void main(String[] args) throws Exception {
+ * SparkAppHandle handle = new SparkLauncher()
+ * .setAppResource("/my/app.jar")
+ * .setMainClass("my.spark.app.Main")
+ * .setMaster("yarn")
--- End diff --
we should explicilty set setDeployMode to cluster here.
---
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]