diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 42f7635d73..7b0ab61a4a 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -193,6 +193,8 @@ Branch-2 ( Unreleased changes ) MAPREDUCE-4610. Support deprecated mapreduce.job.counters.limit property in MR2. (tomwhite) + MAPREDUCE-4629. Remove JobHistory.DEBUG_MODE (Karthik Kambatla via bobby) + Release 2.1.0-alpha - Unreleased INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/jobhistory/JHAdminConfig.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/jobhistory/JHAdminConfig.java index 20f3a89b6d..fe6b134fe5 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/jobhistory/JHAdminConfig.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/jobhistory/JHAdminConfig.java @@ -61,11 +61,6 @@ public class JHAdminConfig { MR_HISTORY_PREFIX + "datestring.cache.size"; public static final int DEFAULT_MR_HISTORY_DATESTRING_CACHE_SIZE = 200000; - //TODO REMOVE debug-mode - /** Equivalent to 0.20 mapreduce.jobhistory.debug.mode */ - public static final String MR_HISTORY_DEBUG_MODE = - MR_HISTORY_PREFIX + "debug-mode"; - /** Path where history files should be stored for DONE jobs. **/ public static final String MR_HISTORY_DONE_DIR = MR_HISTORY_PREFIX + "done-dir"; diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/jobhistory/JobHistoryUtils.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/jobhistory/JobHistoryUtils.java index 38004cc6a7..272641ecae 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/jobhistory/JobHistoryUtils.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/jobhistory/JobHistoryUtils.java @@ -343,20 +343,19 @@ public static String historyLogSubdirectory(JobId id, String timestampComponent, /** * Gets the timestamp component based on millisecond time. * @param millisecondTime - * @param debugMode * @return the timestamp component based on millisecond time */ - public static String timestampDirectoryComponent(long millisecondTime, boolean debugMode) { + public static String timestampDirectoryComponent(long millisecondTime) { Calendar timestamp = Calendar.getInstance(); timestamp.setTimeInMillis(millisecondTime); String dateString = null; - dateString = String.format( - TIMESTAMP_DIR_FORMAT, - timestamp.get(Calendar.YEAR), - // months are 0-based in Calendar, but people will expect January - // to be month #1. - timestamp.get(debugMode ? Calendar.HOUR : Calendar.MONTH) + 1, - timestamp.get(debugMode ? Calendar.MINUTE : Calendar.DAY_OF_MONTH)); + dateString = String + .format(TIMESTAMP_DIR_FORMAT, + timestamp.get(Calendar.YEAR), + // months are 0-based in Calendar, but people will expect January to + // be month #1. + timestamp.get(Calendar.MONTH) + 1, + timestamp.get(Calendar.DAY_OF_MONTH)); dateString = dateString.intern(); return dateString; } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java index bc18646712..6779588859 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java @@ -358,7 +358,6 @@ public synchronized Configuration loadConfFile() throws IOException { private Configuration conf; - private boolean debugMode; private String serialNumberFormat; private Path doneDirPrefixPath = null; // folder for completed jobs @@ -379,8 +378,7 @@ public HistoryFileManager() { public void init(Configuration conf) { this.conf = conf; - debugMode = conf.getBoolean(JHAdminConfig.MR_HISTORY_DEBUG_MODE, false); - int serialNumberLowDigits = debugMode ? 1 : 3; + int serialNumberLowDigits = 3; serialNumberFormat = ("%0" + (JobHistoryUtils.SERIAL_NUMBER_DIRECTORY_DIGITS + serialNumberLowDigits) + "d"); @@ -780,8 +778,8 @@ private Path canonicalHistoryLogPath(JobId id, String timestampComponent) { } private Path canonicalHistoryLogPath(JobId id, long millisecondTime) { - String timestampComponent = JobHistoryUtils.timestampDirectoryComponent( - millisecondTime, debugMode); + String timestampComponent = JobHistoryUtils + .timestampDirectoryComponent(millisecondTime); return new Path(doneDirPrefixPath, JobHistoryUtils.historyLogSubdirectory( id, timestampComponent, serialNumberFormat)); }