Github user gzm55 commented on a diff in the pull request: https://github.com/apache/spark/pull/102#discussion_r10462859 --- Diff: yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala --- @@ -379,7 +381,17 @@ object ClientBase { // Based on code from org.apache.hadoop.mapreduce.v2.util.MRApps def populateHadoopClasspath(conf: Configuration, env: HashMap[String, String]) { - for (c <- conf.getStrings(YarnConfiguration.YARN_APPLICATION_CLASSPATH)) { + val classpathEntries = Option(conf.getStrings( + YarnConfiguration.YARN_APPLICATION_CLASSPATH)).getOrElse( + YarnConfiguration.DEFAULT_YARN_APPLICATION_CLASSPATH) + for (c <- classpathEntries) { + Apps.addToEnvironment(env, Environment.CLASSPATH.name, c.trim) + } + + val mrClasspathEntries = Option(conf.getStrings( + MRJobConfig.MAPREDUCE_APPLICATION_CLASSPATH)).getOrElse( + StringUtils.getStrings(MRJobConfig.DEFAULT_MAPREDUCE_APPLICATION_CLASSPATH)) --- End diff -- Hi, do you mean "getOrElse(MRJobConfig.DEFAULT_MAPREDUCE_APPLICATION_CLASSPATH)" ? I have a compilation error here, saying that StringUtils.getStrings requires a String but gets a Array[String]. And in hadoop CDH 4.6, we have public static final String[] DEFAULT_MAPREDUCE_APPLICATION_CLASSPATH = { "$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/*", "$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/lib/*", };
--- 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. ---