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

    https://github.com/apache/spark/pull/20925#discussion_r179892764
  
    --- Diff: 
launcher/src/main/java/org/apache/spark/launcher/SparkSubmitCommandBuilder.java 
---
    @@ -99,17 +100,27 @@
        */
       private boolean allowsMixedArguments;
     
    +  /**
    +   * This constructor is used when creating a user-configurable launcher. 
It allows the
    +   * spark-submit argument list to be modified after creation.
    +   */
       SparkSubmitCommandBuilder() {
    -    this.sparkArgs = new ArrayList<>();
         this.isAppResourceReq = true;
         this.isExample = false;
    +    this.parsedArgs = new ArrayList<>();
    +    this.userArgs = new ArrayList<>();
       }
     
    +  /**
    +   * This constructor is used when invoking spark-submit; it parses and 
validates arguments
    +   * provided by the user on the command line.
    +   */
       SparkSubmitCommandBuilder(List<String> args) {
         this.allowsMixedArguments = false;
    -    this.sparkArgs = new ArrayList<>();
    +    this.parsedArgs = new ArrayList<>();
         boolean isExample = false;
         List<String> submitArgs = args;
    +    this.userArgs = null;
    --- End diff --
    
    If you want to take a stab at refactoring... I'm not so sure you'd be able 
to make things much better though, since the parameters just control shared 
logic that is applied later.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to