diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/TaskLog.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/TaskLog.java
index a0223dedd6..fdfa3e7710 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/TaskLog.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/TaskLog.java
@@ -466,7 +466,8 @@ public static long getTaskLogLength(JobConf conf) {
}
public static long getTaskLogLimitBytes(Configuration conf) {
- return conf.getLong(JobContext.TASK_USERLOG_LIMIT, 0) * 1024;
+ return conf.getLong(JobContext.TASK_USERLOG_LIMIT, JobContext.DEFAULT_TASK_USERLOG_LIMIT) *
+ 1024;
}
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/MRJobConfig.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/MRJobConfig.java
index 8ec984e777..24689e09da 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/MRJobConfig.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/MRJobConfig.java
@@ -410,6 +410,8 @@ public interface MRJobConfig {
public static final String TASK_USERLOG_LIMIT = "mapreduce.task.userlog.limit.kb";
+ public static final int DEFAULT_TASK_USERLOG_LIMIT = 10240;
+
public static final String MAP_SORT_SPILL_PERCENT = "mapreduce.map.sort.spill.percent";
public static final String MAP_INPUT_FILE = "mapreduce.map.input.file";
@@ -758,11 +760,11 @@ public interface MRJobConfig {
public static final String MR_AM_LOG_KB =
MR_AM_PREFIX + "container.log.limit.kb";
- public static final int DEFAULT_MR_AM_LOG_KB = 0; // don't roll
+ public static final int DEFAULT_MR_AM_LOG_KB = 10240;
public static final String MR_AM_LOG_BACKUPS =
MR_AM_PREFIX + "container.log.backups";
- public static final int DEFAULT_MR_AM_LOG_BACKUPS = 0;
+ public static final int DEFAULT_MR_AM_LOG_BACKUPS = 0; // don't roll
/**The number of splits when reporting progress in MR*/
public static final String MR_AM_NUM_PROGRESS_SPLITS =
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/resources/mapred-default.xml b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/resources/mapred-default.xml
index a6d68acda3..493e4c3a37 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/resources/mapred-default.xml
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/resources/mapred-default.xml
@@ -823,16 +823,15 @@
mapreduce.task.userlog.limit.kb
- 0
- The maximum size of user-logs of each task in KB. 0 disables the cap.
+ 10240
+ The maximum size of user-logs of each task in KB.
yarn.app.mapreduce.am.container.log.limit.kb
- 0
+ 10240
The maximum size of the MRAppMaster attempt container logs in KB.
- 0 disables the cap.