Github user squito commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7052#discussion_r40355357
  
    --- Diff: 
launcher/src/main/java/org/apache/spark/launcher/package-info.java ---
    @@ -17,17 +17,45 @@
     
     /**
      * Library for launching Spark applications.
    - * 
    + *
      * <p>
      * This library allows applications to launch Spark programmatically. 
There's only one entry
      * point to the library - the {@link 
org.apache.spark.launcher.SparkLauncher} class.
      * </p>
      *
      * <p>
    - * To launch a Spark application, just instantiate a {@link 
org.apache.spark.launcher.SparkLauncher}
    - * and configure the application to run. For example:
    + * The {@link org.apache.spark.launcher.SparkLauncher#startApplication(
    + * org.apache.spark.launcher.SparkAppHandle.Listener...)} can be used to 
start Spark and provide
    + * a handle to monitor and control the running application:
      * </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("local")
    + *         .setConf(SparkLauncher.DRIVER_MEMORY, "2g")
    + *         .startApplication();
    + *       handle.stop();
    --- End diff --
    
    I wouldn't include a call to `handle.stop()` in this example -- or if you 
do, add a comment explaining why you would call it.


---
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]

Reply via email to