MAPREDUCE-6059. Speed up history server startup time (Siqi Li via aw)
This commit is contained in:
parent
f990e9d229
commit
fd57ab2002
@ -94,6 +94,8 @@ Trunk (Unreleased)
|
|||||||
MAPREDUCE-6013. [post-HADOOP-9902] mapred version is missing (Akira AJISAKA
|
MAPREDUCE-6013. [post-HADOOP-9902] mapred version is missing (Akira AJISAKA
|
||||||
via aw)
|
via aw)
|
||||||
|
|
||||||
|
MAPREDUCE-6059. Speed up history server startup time (Siqi Li via aw)
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
||||||
MAPREDUCE-6191. Improve clearing stale state of Java serialization
|
MAPREDUCE-6191. Improve clearing stale state of Java serialization
|
||||||
|
@ -263,6 +263,10 @@ public Collection<HistoryFileInfo> values() {
|
|||||||
public HistoryFileInfo get(JobId jobId) {
|
public HistoryFileInfo get(JobId jobId) {
|
||||||
return cache.get(jobId);
|
return cache.get(jobId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isFull() {
|
||||||
|
return cache.size() >= maxSize;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -668,6 +672,10 @@ void initExisting() throws IOException {
|
|||||||
for (FileStatus fs : timestampedDirList) {
|
for (FileStatus fs : timestampedDirList) {
|
||||||
// TODO Could verify the correct format for these directories.
|
// TODO Could verify the correct format for these directories.
|
||||||
addDirectoryToSerialNumberIndex(fs.getPath());
|
addDirectoryToSerialNumberIndex(fs.getPath());
|
||||||
|
}
|
||||||
|
for (int i= timestampedDirList.size() - 1;
|
||||||
|
i >= 0 && !jobListCache.isFull(); i--) {
|
||||||
|
FileStatus fs = timestampedDirList.get(i);
|
||||||
addDirectoryToJobListCache(fs.getPath());
|
addDirectoryToJobListCache(fs.getPath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user