Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/6752#discussion_r32440729
--- 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)
--- End diff --
Not sure it's worth it, especially since the list of characters that may
cause problems is different from platform to platform. Since this is a pretty
specific config, I think it's ok to trust the user to know what he's doing
instead. (Most times it won't even be users setting this, but some admin, or
the distro install / config scripts.)
---
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]