MAPREDUCE-4025. AM can crash if task attempt reports bogus progress value (Jason Lowe via bobby)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1302645 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Joseph Evans 2012-03-19 20:31:55 +00:00
parent f77b1a63ec
commit 9d8d02b68b
2 changed files with 4 additions and 0 deletions

View File

@ -194,6 +194,9 @@ Release 0.23.2 - UNRELEASED
MAPREDUCE-3954. Added new envs to separate heap size for different daemons MAPREDUCE-3954. Added new envs to separate heap size for different daemons
started via bin scripts. (Robert Joseph Evans via vinodkv) started via bin scripts. (Robert Joseph Evans via vinodkv)
MAPREDUCE-4025. AM can crash if task attempt reports bogus progress value
(Jason Lowe via bobby)
OPTIMIZATIONS OPTIMIZATIONS
MAPREDUCE-3901. Modified JobHistory records in YARN to lazily load job and MAPREDUCE-3901. Modified JobHistory records in YARN to lazily load job and

View File

@ -1030,6 +1030,7 @@ private WrappedProgressSplitsBlock getProgressSplitBlock() {
private void updateProgressSplits() { private void updateProgressSplits() {
double newProgress = reportedStatus.progress; double newProgress = reportedStatus.progress;
newProgress = Math.max(Math.min(newProgress, 1.0D), 0.0D);
Counters counters = reportedStatus.counters; Counters counters = reportedStatus.counters;
if (counters == null) if (counters == null)
return; return;