Github user tgravescs commented on a diff in the pull request:
https://github.com/apache/spark/pull/396#discussion_r11659991
--- Diff:
yarn/common/src/main/scala/org/apache/spark/deploy/yarn/YarnSparkHadoopUtil.scala
---
@@ -73,4 +81,61 @@ object YarnSparkHadoopUtil {
def getLoggingArgsForContainerCommandLine(): String = {
"-Dlog4j.configuration=log4j-spark-container.properties"
}
+
+ def addToEnvironment(
+ env: HashMap[String, String],
+ variable: String,
+ value: String,
+ classPathSeparator: String) = {
+ var envVariable = ""
+ if (env.get(variable) == None) {
+ envVariable = value
+ } else {
+ envVariable = env.get(variable).get + classPathSeparator + value
+ }
+ env put (StringInterner.weakIntern(variable),
StringInterner.weakIntern(envVariable))
+ }
+
+ def setEnvFromInputString(
+ env: HashMap[String, String],
+ envString: String,
+ classPathSeparator: String) = {
+ if (envString != null && envString.length() > 0) {
+ var childEnvs = envString.split(",")
+ var p = Pattern.compile(getEnvironmentVariableRegex())
+ for (cEnv <- childEnvs) {
+ var parts = cEnv.split("=") // split on '='
--- End diff --
Yeah unfortunately there are a few issues with Hadoop/MR with parsing
configs and env variables that can limit there use.
---
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.
---