MAPREDUCE-6059. Speed up history server startup time (Siqi Li via aw)
(cherry picked from commit fd57ab2002
)
Conflicts:
hadoop-mapreduce-project/CHANGES.txt
This commit is contained in:
parent
4cd9657b71
commit
2dc4af2b93
|
@ -48,6 +48,8 @@ Release 2.7.0 - UNRELEASED
|
||||||
from key and value at the end of the iteration to save memory.
|
from key and value at the end of the iteration to save memory.
|
||||||
(Zhihai Xu via kasha)
|
(Zhihai Xu via kasha)
|
||||||
|
|
||||||
|
MAPREDUCE-6059. Speed up history server startup time (Siqi Li via aw)
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
||||||
MAPREDUCE-6210. Use getApplicationAttemptId() instead of getApplicationId()
|
MAPREDUCE-6210. Use getApplicationAttemptId() instead of getApplicationId()
|
||||||
|
|
|
@ -263,6 +263,10 @@ public class HistoryFileManager extends AbstractService {
|
||||||
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 @@ public class HistoryFileManager extends AbstractService {
|
||||||
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