From 8b3c3e09c8bf11544b564e41e3b74c05b3e6d832 Mon Sep 17 00:00:00 2001 From: "Kirill A. Korinskiy" Date: Fri, 6 Mar 2015 13:17:55 +0700 Subject: [PATCH] Add type types for extends FileInputFormat on BSONFileInputFormat --- .../src/main/java/com/mongodb/hadoop/BSONFileInputFormat.java | 4 +++- .../java/com/mongodb/hadoop/mapred/BSONFileInputFormat.java | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/mongodb/hadoop/BSONFileInputFormat.java b/core/src/main/java/com/mongodb/hadoop/BSONFileInputFormat.java index 9827ec1f..28dd905b 100644 --- a/core/src/main/java/com/mongodb/hadoop/BSONFileInputFormat.java +++ b/core/src/main/java/com/mongodb/hadoop/BSONFileInputFormat.java @@ -23,6 +23,7 @@ import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.PathFilter; +import org.apache.hadoop.io.NullWritable; import org.apache.hadoop.mapreduce.InputSplit; import org.apache.hadoop.mapreduce.JobContext; import org.apache.hadoop.mapreduce.RecordReader; @@ -30,13 +31,14 @@ import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; import org.apache.hadoop.mapreduce.lib.input.FileSplit; import org.apache.hadoop.util.ReflectionUtils; +import org.bson.BSONObject; import java.io.IOException; import java.util.ArrayList; import java.util.List; -public class BSONFileInputFormat extends FileInputFormat { +public class BSONFileInputFormat extends FileInputFormat { private static final Log LOG = LogFactory.getLog(BSONFileInputFormat.class); diff --git a/core/src/main/java/com/mongodb/hadoop/mapred/BSONFileInputFormat.java b/core/src/main/java/com/mongodb/hadoop/mapred/BSONFileInputFormat.java index 5a59a5e3..0b6ebc6b 100644 --- a/core/src/main/java/com/mongodb/hadoop/mapred/BSONFileInputFormat.java +++ b/core/src/main/java/com/mongodb/hadoop/mapred/BSONFileInputFormat.java @@ -29,6 +29,7 @@ import org.apache.hadoop.mapred.JobContext; import org.apache.hadoop.mapred.RecordReader; import org.apache.hadoop.mapred.Reporter; +import org.bson.BSONObject; import java.io.IOException; import java.util.ArrayList; @@ -36,7 +37,7 @@ import static java.lang.String.format; -public class BSONFileInputFormat extends FileInputFormat { +public class BSONFileInputFormat extends FileInputFormat { protected boolean isSplitable(final JobContext context, final Path filename) { return true;