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

    https://github.com/apache/spark/pull/21476#discussion_r192804713
  
    --- Diff: 
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala 
---
    @@ -1485,6 +1486,22 @@ private object Client extends Logging {
         YarnAppReport(report.getYarnApplicationState(), 
report.getFinalApplicationStatus(), diagsOpt)
       }
     
    +  /**
    +   * Create a properly quoted library path string to be added as a prefix 
to the command executed by
    +   * YARN. This is different from plain quoting due to YARN executing the 
command through "bash -c".
    +   */
    +  def createLibraryPathPrefix(libpath: String, conf: SparkConf): String = {
    +    val cmdPrefix = if (Utils.isWindows) {
    +      Utils.libraryPathEnvPrefix(Seq(libpath))
    +    } else {
    +      val envName = Utils.libraryPathEnvName
    +      // For quotes, escape both the quote and the escape character when 
encoding in the command
    +      // string.
    +      val quoted = libpath.replace("\"", "\\\\\\\"")
    --- End diff --
    
    Dumb question i think escaping "\"" => "\\\"". Not sure why we have so many 
escapes otherwise. Trying to understand, else PR looks good


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to