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

    https://github.com/apache/spark/pull/14201#discussion_r70871119
  
    --- Diff: 
launcher/src/main/java/org/apache/spark/launcher/SparkLauncher.java ---
    @@ -359,6 +364,82 @@ public SparkLauncher setVerbose(boolean verbose) {
       }
     
       /**
    +   * Sets the working directory of the driver process.
    +   * @param dir The directory to set as the driver's working directory.
    +   * @return This launcher.
    +     */
    +  public SparkLauncher directory(File dir) {
    +    builder.workingDir = dir;
    +    return this;
    +  }
    +
    +  /**
    +   * Specifies that stderr in the driver should be redirected to stdout.
    +   * @return This launcher.
    +   */
    +  public SparkLauncher redirectError() {
    +    builder.redirectErrorStream = true;
    +    return this;
    +  }
    +
    +  /**
    +   * Redirects error output to the specified Redirect.
    +   * @param to The method of redirection.
    +   * @return This launcher.
    +   */
    +  public SparkLauncher redirectError(ProcessBuilder.Redirect to) {
    +    builder.errorStream = to;
    +    return this;
    +  }
    +
    +  /**
    +   * Redirects standard output to the specified Redirect.
    +   * @param to The method of redirection.
    +   * @return This launcher.
    +   */
    +  public SparkLauncher redirectOutput(ProcessBuilder.Redirect to) {
    +    builder.outputStream = to;
    +    return this;
    +  }
    +
    +  /**
    +   * Redirects error output to the specified File.
    +   * @param errFile The file to which stderr is written.
    --- End diff --
    
    nit: can you add an empty line between the description and the param list 
in all the new methods?


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