From 089b3edd0e490a775327f86a5b230edf7f55145e Mon Sep 17 00:00:00 2001 From: Vinod Kumar Vavilapalli Date: Sat, 1 Jun 2013 00:34:24 +0000 Subject: [PATCH] MAPREDUCE-5273. Bring back a couple of protected variables in mapred and mapreduce CombineFileRecordReader for binary compatibility with 1.x APIs. Contributed by Mayank Bansal. svn merge --ignore-ancestry -c 1488442 ../../trunk/ git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1488443 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 4 ++++ .../org/apache/hadoop/mapred/lib/CombineFileRecordReader.java | 3 +++ .../hadoop/mapreduce/lib/input/CombineFileRecordReader.java | 3 +++ 3 files changed, 10 insertions(+) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index baba647e055..1d2524e7593 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -122,6 +122,10 @@ Release 2.0.5-beta - UNRELEASED DBInputFormat.DBRecordReader for binary compatibility with 1.x mapred APIs. (Zhijie Shen via vinodkv) + MAPREDUCE-5273. Bring back a couple of protected variables in mapred and + mapreduce CombineFileRecordReader for binary compatibility with 1.x APIs. + (Mayank Bansal via vinodkv) + OPTIMIZATIONS MAPREDUCE-4974. Optimising the LineRecordReader initialize() method diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/CombineFileRecordReader.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/CombineFileRecordReader.java index 37980dddd95..1abaef260c5 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/CombineFileRecordReader.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/CombineFileRecordReader.java @@ -49,7 +49,9 @@ public class CombineFileRecordReader implements RecordReader { protected CombineFileSplit split; protected JobConf jc; protected Reporter reporter; + protected Class> rrClass; protected Constructor> rrConstructor; + protected FileSystem fs; protected int idx; protected long progress; @@ -104,6 +106,7 @@ public class CombineFileRecordReader implements RecordReader { throws IOException { this.split = split; this.jc = job; + this.rrClass = rrClass; this.reporter = reporter; this.idx = 0; this.curReader = null; diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/CombineFileRecordReader.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/CombineFileRecordReader.java index 8749362c221..fb86cbafc12 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/CombineFileRecordReader.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/CombineFileRecordReader.java @@ -46,7 +46,9 @@ public class CombineFileRecordReader extends RecordReader { Integer.class}; protected CombineFileSplit split; + protected Class> rrClass; protected Constructor> rrConstructor; + protected FileSystem fs; protected TaskAttemptContext context; protected int idx; @@ -109,6 +111,7 @@ public class CombineFileRecordReader extends RecordReader { throws IOException { this.split = split; this.context = context; + this.rrClass = rrClass; this.idx = 0; this.curReader = null; this.progress = 0;