|
@@ -160,7 +160,9 @@ public class JobConf extends Configuration {
|
|
|
/**
|
|
|
* Construct a map/reduce job configuration.
|
|
|
*/
|
|
|
- public JobConf() {}
|
|
|
+ public JobConf() {
|
|
|
+ checkAndWarnDeprecation();
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* Construct a map/reduce job configuration.
|
|
@@ -169,6 +171,7 @@ public class JobConf extends Configuration {
|
|
|
*/
|
|
|
public JobConf(Class exampleClass) {
|
|
|
setJarByClass(exampleClass);
|
|
|
+ checkAndWarnDeprecation();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -178,6 +181,7 @@ public class JobConf extends Configuration {
|
|
|
*/
|
|
|
public JobConf(Configuration conf) {
|
|
|
super(conf);
|
|
|
+ checkAndWarnDeprecation();
|
|
|
}
|
|
|
|
|
|
|
|
@@ -207,6 +211,7 @@ public class JobConf extends Configuration {
|
|
|
public JobConf(Path config) {
|
|
|
super();
|
|
|
addResource(config);
|
|
|
+ checkAndWarnDeprecation();
|
|
|
}
|
|
|
|
|
|
/** A new map/reduce configuration where the behavior of reading from the
|
|
@@ -219,6 +224,7 @@ public class JobConf extends Configuration {
|
|
|
*/
|
|
|
public JobConf(boolean loadDefaults) {
|
|
|
super(loadDefaults);
|
|
|
+ checkAndWarnDeprecation();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1423,12 +1429,6 @@ public class JobConf extends Configuration {
|
|
|
|
|
|
public long getMemoryForMapTask() {
|
|
|
if (get(MAPRED_TASK_MAXVMEM_PROPERTY) != null) {
|
|
|
- LOG.warn(
|
|
|
- JobConf.deprecatedString(
|
|
|
- JobConf.MAPRED_TASK_MAXVMEM_PROPERTY)+
|
|
|
- " instead use "+JobConf.MAPRED_JOB_MAP_MEMORY_MB_PROPERTY + " and "
|
|
|
- + JobConf.MAPRED_JOB_REDUCE_MEMORY_MB_PROPERTY);
|
|
|
-
|
|
|
long val = getLong(
|
|
|
MAPRED_TASK_MAXVMEM_PROPERTY, DISABLED_MEMORY_LIMIT);
|
|
|
return (val == DISABLED_MEMORY_LIMIT) ? val :
|
|
@@ -1445,11 +1445,6 @@ public class JobConf extends Configuration {
|
|
|
|
|
|
public long getMemoryForReduceTask() {
|
|
|
if (get(MAPRED_TASK_MAXVMEM_PROPERTY) != null) {
|
|
|
- LOG.warn(
|
|
|
- JobConf.deprecatedString(
|
|
|
- JobConf.MAPRED_TASK_MAXVMEM_PROPERTY)+
|
|
|
- " instead use "+JobConf.MAPRED_JOB_MAP_MEMORY_MB_PROPERTY + " and "
|
|
|
- + JobConf.MAPRED_JOB_REDUCE_MEMORY_MB_PROPERTY);
|
|
|
long val = getLong(
|
|
|
MAPRED_TASK_MAXVMEM_PROPERTY, DISABLED_MEMORY_LIMIT);
|
|
|
return (val == DISABLED_MEMORY_LIMIT) ? val :
|
|
@@ -1628,8 +1623,17 @@ public class JobConf extends Configuration {
|
|
|
}
|
|
|
|
|
|
static String deprecatedString(String key) {
|
|
|
- return "The variable " + key + " is no longer used";
|
|
|
+ return "The variable " + key + " is no longer used.";
|
|
|
+ }
|
|
|
+
|
|
|
+ private void checkAndWarnDeprecation() {
|
|
|
+ if(get(JobConf.MAPRED_TASK_MAXVMEM_PROPERTY) != null) {
|
|
|
+ LOG.warn(JobConf.deprecatedString(JobConf.MAPRED_TASK_MAXVMEM_PROPERTY)
|
|
|
+ + " Instead use " + JobConf.MAPRED_JOB_MAP_MEMORY_MB_PROPERTY
|
|
|
+ + " and " + JobConf.MAPRED_JOB_REDUCE_MEMORY_MB_PROPERTY);
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|