From c02c9218d99b8e83e376c4dd33fda21dbedbab49 Mon Sep 17 00:00:00 2001 From: Robert Joseph Evans Date: Mon, 19 Mar 2012 20:32:54 +0000 Subject: [PATCH] svn merge -c 1302645 from trunk to branch-0.23 FIXES 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/branches/branch-0.23@1302646 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../hadoop/mapreduce/v2/app/job/impl/TaskAttemptImpl.java | 1 + 2 files changed, 4 insertions(+) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 4474e66d160..fa967ee77e5 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -108,6 +108,9 @@ Release 0.23.2 - UNRELEASED MAPREDUCE-3954. Added new envs to separate heap size for different daemons 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 MAPREDUCE-3901. Modified JobHistory records in YARN to lazily load job and diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TaskAttemptImpl.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TaskAttemptImpl.java index 9d29a4c55ef..dcb8972ade6 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TaskAttemptImpl.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TaskAttemptImpl.java @@ -1030,6 +1030,7 @@ public abstract class TaskAttemptImpl implements private void updateProgressSplits() { double newProgress = reportedStatus.progress; + newProgress = Math.max(Math.min(newProgress, 1.0D), 0.0D); Counters counters = reportedStatus.counters; if (counters == null) return;