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

    https://github.com/apache/spark/pull/6752#discussion_r32537855
  
    --- Diff: yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala ---
    @@ -1183,6 +1187,29 @@ object Client extends Logging {
         YarnSparkHadoopUtil.addPathToEnvironment(env, 
Environment.CLASSPATH.name, path)
     
       /**
    +   * Returns the path to be sent to the NM for a local path string.
    +   *
    +   * This method uses two configuration values:
    +   *
    +   * - spark.yarn.config.localPath: a string that identifies a portion of 
the input path that may
    +   *   only be valid in the local process.
    +   * - spark.yarn.config.clusterPath: a string with which to replace the 
local path. This may
    +   *   contain, for example, env variable references, which will be 
expanded by the NMs when
    +   *   starting containers.
    +   *
    +   * If either config is not available, the input path is returned.
    +   */
    +  def getClusterPath(conf: SparkConf, path: String): String = {
    +    val localPath = conf.get("spark.yarn.config.localPath", null)
    +    val clusterPath = conf.get("spark.yarn.config.clusterPath", null)
    +    if (localPath != null && clusterPath != null) {
    +      path.replace(localPath, clusterPath)
    --- End diff --
    
    makes sense ... again I was thinking that parsing classpaths would be 
simpler b/c I forgot about  all platforms.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to