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

    https://github.com/apache/spark/pull/3205#discussion_r24257335
  
    --- Diff: 
core/src/main/scala/org/apache/spark/deploy/worker/ExecutorRunner.scala ---
    @@ -108,13 +108,12 @@ private[spark] class ExecutorRunner(
       }
     
       /** Replace variables such as {{EXECUTOR_ID}} and {{CORES}} in a command 
argument passed to us */
    -  def substituteVariables(argument: String): String = argument match {
    --- End diff --
    
    Nevermind, I see that the original purpose of the method was to replace 
entire tokens, not tokens within argument strings. And I see why you need it to 
now replace tokens within strings. 
    
    It sounds like the behavior changes is OK, since I do not expect that these 
`{{TOKEN}}`s appear anywhere in the command line arguments except where they 
are supposed to be replaced. This change affects not just JVM options but all 
command line options.
    
    I like this change, with two small additions. There is a similar method in 
`DriverRunner`. Although we're not considering replacement within driver args 
now, it might be good to modify that method too for consistency along the same 
lines, to avoid surprises.
    
    A brief test of the new behavior, to go along with the existing unit test, 
would be good too.


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