List of usage examples for org.apache.hadoop.mapred JobConf MAPRED_TASK_JAVA_OPTS
String MAPRED_TASK_JAVA_OPTS
To view the source code for org.apache.hadoop.mapred JobConf MAPRED_TASK_JAVA_OPTS.
Click Source Link
From source file:org.apache.tez.mapreduce.hadoop.MRHelpers.java
License:Apache License
/** * Generate JVM options based on MapReduce mapper java options. </p> * * This is only meant to be used if frameworks are not setting up their own java options, * and would like to fallback to using java options which may already be configured for * Hadoop MapReduce mappers.// w w w . j a va 2 s. co m * * Uses mapreduce.admin.map.child.java.opts, mapreduce.map.java.opts and * mapreduce.map.log.level from config to generate the opts. * * @param conf Configuration to be used to extract JVM opts specific info * @return JAVA_OPTS string to be used in launching the JVM */ @SuppressWarnings("deprecation") public static String getJavaOptsForMRMapper(Configuration conf) { String adminOpts = conf.get(MRJobConfig.MAPRED_MAP_ADMIN_JAVA_OPTS, MRJobConfig.DEFAULT_MAPRED_ADMIN_JAVA_OPTS); String userOpts = conf.get(MRJobConfig.MAP_JAVA_OPTS, conf.get(JobConf.MAPRED_TASK_JAVA_OPTS, JobConf.DEFAULT_MAPRED_TASK_JAVA_OPTS)); return adminOpts.trim() + " " + userOpts.trim() + " " + getLog4jCmdLineProperties(conf, true); }
From source file:org.apache.tez.mapreduce.hadoop.MRHelpers.java
License:Apache License
/** * Generate JVM options based on MapReduce reducer java options. </p> * * This is only meant to be used if frameworks are not setting up their own java options, * and would like to fallback to using java options which may already be configured for * Hadoop MapReduce reducers.//from ww w. j a va2s . c om * * Uses mapreduce.admin.reduce.child.java.opts, mapreduce.reduce.java.opts * and mapreduce.reduce.log.level from config to generate the opts. * * @param conf Configuration to be used to extract JVM opts specific info * @return JAVA_OPTS string to be used in launching the JVM */ @SuppressWarnings("deprecation") public static String getJavaOptsForMRReducer(Configuration conf) { String adminOpts = conf.get(MRJobConfig.MAPRED_REDUCE_ADMIN_JAVA_OPTS, MRJobConfig.DEFAULT_MAPRED_ADMIN_JAVA_OPTS); String userOpts = conf.get(MRJobConfig.REDUCE_JAVA_OPTS, conf.get(JobConf.MAPRED_TASK_JAVA_OPTS, JobConf.DEFAULT_MAPRED_TASK_JAVA_OPTS)); return adminOpts.trim() + " " + userOpts.trim() + " " + getLog4jCmdLineProperties(conf, false); }