From 5acc010db874187f3bce1305c17f45cb51eb15b0 Mon Sep 17 00:00:00 2001 From: Todd Lipcon Date: Fri, 21 Oct 2011 05:20:14 +0000 Subject: [PATCH] MAPREDUCE-2629. Workaround a JVM class loading quirk which prevents JIT compilation of inner classes methods in ReduceContextImpl. Contributed by Eric Caspole. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1187182 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../hadoop/mapreduce/task/ReduceContextImpl.java | 12 ++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 7c3582f3a6d..743e95cbe33 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -375,6 +375,9 @@ Release 0.23.0 - Unreleased MAPREDUCE-901. Efficient framework counters. (llu via acmurthy) + MAPREDUCE-2629. Workaround a JVM class loading quirk which prevents + JIT compilation of inner classes methods in ReduceContextImpl. + BUG FIXES MAPREDUCE-2603. Disable High-Ram emulation in system tests. diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/ReduceContextImpl.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/ReduceContextImpl.java index 9f588d55ac5..7ad08e956d9 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/ReduceContextImpl.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/ReduceContextImpl.java @@ -176,11 +176,15 @@ public class ReduceContextImpl return value; } + BackupStore getBackupStore() { + return backupStore; + } + protected class ValueIterator implements ReduceContext.ValueIterator { private boolean inReset = false; private boolean clearMarkFlag = false; - + @Override public boolean hasNext() { try { @@ -247,7 +251,7 @@ public class ReduceContextImpl @Override public void mark() throws IOException { - if (backupStore == null) { + if (getBackupStore() == null) { backupStore = new BackupStore(conf, taskid); } isMarked = true; @@ -290,7 +294,7 @@ public class ReduceContextImpl @Override public void clearMark() throws IOException { - if (backupStore == null) { + if (getBackupStore() == null) { return; } if (inReset) { @@ -308,7 +312,7 @@ public class ReduceContextImpl * @throws IOException */ public void resetBackupStore() throws IOException { - if (backupStore == null) { + if (getBackupStore() == null) { return; } inReset = isMarked = false;