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

    https://github.com/apache/spark/pull/5096#discussion_r27847946
  
    --- Diff: yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala ---
    @@ -497,12 +503,15 @@ private[spark] class Client(
         if (args.primaryPyFile != null && args.primaryPyFile.endsWith(".py")) {
           args.userArgs = ArrayBuffer(args.primaryPyFile, args.pyFiles) ++ 
args.userArgs
         }
    +    if (args.primaryRFile != null && args.primaryRFile.endsWith(".R")) {
    +      args.userArgs = ArrayBuffer(args.primaryRFile) ++ args.userArgs
    +    }
         val userArgs = args.userArgs.flatMap { arg =>
           Seq("--arg", YarnSparkHadoopUtil.escapeForShell(arg))
         }
         val amArgs =
    -      Seq(amClass) ++ userClass ++ userJar ++ primaryPyFile ++ pyFiles ++ 
userArgs ++
    -        Seq(
    +      Seq(amClass) ++ userClass ++ userJar ++ primaryPyFile ++ pyFiles ++ 
primaryRFile ++
    --- End diff --
    
    They should be mutually exclusive. So if SparkSubmit is the only class used 
to create these arguments we have a `else if` block [1] that prevents both 
primaryPyFile and primary R file from being set.  I could also add an 
exclusivity check somewhere -- Which file would be the best place to do this ?
    
    [1] 
https://github.com/amplab-extras/spark/blob/64eda24017d1d05c3dfba3a84c96b557cbd2ca76/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala#L482


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