You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by aw...@apache.org on 2015/02/05 02:36:35 UTC
hadoop git commit: MAPREDUCE-6059. Speed up history server startup
time (Siqi Li via aw)
Repository: hadoop
Updated Branches:
refs/heads/trunk f990e9d22 -> fd57ab200
MAPREDUCE-6059. Speed up history server startup time (Siqi Li via aw)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/fd57ab20
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/fd57ab20
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/fd57ab20
Branch: refs/heads/trunk
Commit: fd57ab2002f97dcc83d455a5e0c770c8efde77a4
Parents: f990e9d
Author: Allen Wittenauer <aw...@apache.org>
Authored: Wed Feb 4 17:36:28 2015 -0800
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Wed Feb 4 17:36:28 2015 -0800
----------------------------------------------------------------------
hadoop-mapreduce-project/CHANGES.txt | 2 ++
.../apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java | 8 ++++++++
2 files changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/fd57ab20/hadoop-mapreduce-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt
index a633b4e..0fbf9a8 100644
--- a/hadoop-mapreduce-project/CHANGES.txt
+++ b/hadoop-mapreduce-project/CHANGES.txt
@@ -94,6 +94,8 @@ Trunk (Unreleased)
MAPREDUCE-6013. [post-HADOOP-9902] mapred version is missing (Akira AJISAKA
via aw)
+ MAPREDUCE-6059. Speed up history server startup time (Siqi Li via aw)
+
BUG FIXES
MAPREDUCE-6191. Improve clearing stale state of Java serialization
http://git-wip-us.apache.org/repos/asf/hadoop/blob/fd57ab20/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java
----------------------------------------------------------------------
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 40844df..65f8a4f 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
@@ -263,6 +263,10 @@ public class HistoryFileManager extends AbstractService {
public HistoryFileInfo get(JobId jobId) {
return cache.get(jobId);
}
+
+ public boolean isFull() {
+ return cache.size() >= maxSize;
+ }
}
/**
@@ -668,6 +672,10 @@ public class HistoryFileManager extends AbstractService {
for (FileStatus fs : timestampedDirList) {
// TODO Could verify the correct format for these directories.
addDirectoryToSerialNumberIndex(fs.getPath());
+ }
+ for (int i= timestampedDirList.size() - 1;
+ i >= 0 && !jobListCache.isFull(); i--) {
+ FileStatus fs = timestampedDirList.get(i);
addDirectoryToJobListCache(fs.getPath());
}
}