From f5517a82001eea2207a93d3b70d42ad8f4ddeccb Mon Sep 17 00:00:00 2001 From: Sean Busbey Date: Thu, 4 May 2017 11:16:25 -0500 Subject: [PATCH] HADOOP-13921. Remove log4j classes from JobConf. Signed-off-by: Akira Ajisaka --- hadoop-client-modules/hadoop-client-runtime/pom.xml | 1 - .../java/org/apache/hadoop/mapreduce/v2/util/MRApps.java | 4 ++-- .../src/main/java/org/apache/hadoop/mapred/JobConf.java | 7 +++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/hadoop-client-modules/hadoop-client-runtime/pom.xml b/hadoop-client-modules/hadoop-client-runtime/pom.xml index dc0f005b087..3c8364ccc8d 100644 --- a/hadoop-client-modules/hadoop-client-runtime/pom.xml +++ b/hadoop-client-modules/hadoop-client-runtime/pom.xml @@ -96,7 +96,6 @@ log4j diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/util/MRApps.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/util/MRApps.java index 5fd66acea31..a43da653146 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/util/MRApps.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/util/MRApps.java @@ -650,12 +650,12 @@ public class MRApps extends Apps { if (isMap) { return conf.get( MRJobConfig.MAP_LOG_LEVEL, - JobConf.DEFAULT_LOG_LEVEL.toString() + JobConf.DEFAULT_LOG_LEVEL ); } else { return conf.get( MRJobConfig.REDUCE_LOG_LEVEL, - JobConf.DEFAULT_LOG_LEVEL.toString() + JobConf.DEFAULT_LOG_LEVEL ); } } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobConf.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobConf.java index f286a96a44d..be8fa9edc82 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobConf.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobConf.java @@ -53,7 +53,6 @@ import org.apache.hadoop.security.Credentials; import org.apache.hadoop.util.ClassUtil; import org.apache.hadoop.util.ReflectionUtils; import org.apache.hadoop.util.Tool; -import org.apache.log4j.Level; /** * A map/reduce job configuration. @@ -333,7 +332,7 @@ public class JobConf extends Configuration { private Credentials credentials = new Credentials(); /** - * Configuration key to set the logging {@link Level} for the map task. + * Configuration key to set the logging level for the map task. * * The allowed logging levels are: * OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE and ALL. @@ -342,7 +341,7 @@ public class JobConf extends Configuration { JobContext.MAP_LOG_LEVEL; /** - * Configuration key to set the logging {@link Level} for the reduce task. + * Configuration key to set the logging level for the reduce task. * * The allowed logging levels are: * OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE and ALL. @@ -353,7 +352,7 @@ public class JobConf extends Configuration { /** * Default logging level for map/reduce tasks. */ - public static final Level DEFAULT_LOG_LEVEL = Level.INFO; + public static final String DEFAULT_LOG_LEVEL = JobContext.DEFAULT_LOG_LEVEL; /** * The variable is kept for M/R 1.x applications, M/R 2.x applications should