List of usage examples for org.apache.hadoop.mapreduce MRConfig MAPREDUCE_APP_SUBMISSION_CROSS_PLATFORM
String MAPREDUCE_APP_SUBMISSION_CROSS_PLATFORM
To view the source code for org.apache.hadoop.mapreduce MRConfig MAPREDUCE_APP_SUBMISSION_CROSS_PLATFORM.
Click Source Link
From source file:org.apache.oozie.util.ClasspathUtils.java
License:Apache License
public static void setupClasspath(Map<String, String> env, Configuration conf) throws IOException { // Propagate the system classpath when using the mini cluster if (usingMiniYarnCluster) { MRApps.addToEnvironment(env, ApplicationConstants.Environment.CLASSPATH.name(), System.getProperty("java.class.path"), conf); }/* w ww . j av a 2s . co m*/ for (String entry : CLASSPATH_ENTRIES) { MRApps.addToEnvironment(env, ApplicationConstants.Environment.CLASSPATH.name(), entry, conf); } // a * in the classpath will only find a .jar, so we need to filter out // all .jars and add everything else addToClasspathIfNotJar(org.apache.hadoop.mapreduce.filecache.DistributedCache.getFileClassPaths(conf), org.apache.hadoop.mapreduce.filecache.DistributedCache.getCacheFiles(conf), conf, env, ApplicationConstants.Environment.PWD.$()); addToClasspathIfNotJar(org.apache.hadoop.mapreduce.filecache.DistributedCache.getArchiveClassPaths(conf), org.apache.hadoop.mapreduce.filecache.DistributedCache.getCacheArchives(conf), conf, env, ApplicationConstants.Environment.PWD.$()); boolean crossPlatform = conf.getBoolean(MRConfig.MAPREDUCE_APP_SUBMISSION_CROSS_PLATFORM, MRConfig.DEFAULT_MAPREDUCE_APP_SUBMISSION_CROSS_PLATFORM); for (String c : conf.getStrings(YarnConfiguration.YARN_APPLICATION_CLASSPATH, crossPlatform ? YarnConfiguration.DEFAULT_YARN_CROSS_PLATFORM_APPLICATION_CLASSPATH : YarnConfiguration.DEFAULT_YARN_APPLICATION_CLASSPATH)) { MRApps.addToEnvironment(env, ApplicationConstants.Environment.CLASSPATH.name(), c.trim(), conf); } }
From source file:org.apache.oozie.util.ClasspathUtils.java
License:Apache License
public static void addMapReduceToClasspath(Map<String, String> env, Configuration conf) { boolean crossPlatform = conf.getBoolean(MRConfig.MAPREDUCE_APP_SUBMISSION_CROSS_PLATFORM, MRConfig.DEFAULT_MAPREDUCE_APP_SUBMISSION_CROSS_PLATFORM); for (String c : conf.getStrings(MRJobConfig.MAPREDUCE_APPLICATION_CLASSPATH, crossPlatform//w w w . ja v a2 s . c o m ? StringUtils.getStrings(MRJobConfig.DEFAULT_MAPREDUCE_CROSS_PLATFORM_APPLICATION_CLASSPATH) : StringUtils.getStrings(MRJobConfig.DEFAULT_MAPREDUCE_APPLICATION_CLASSPATH))) { MRApps.addToEnvironment(env, ApplicationConstants.Environment.CLASSPATH.name(), c.trim(), conf); } }