You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@crunch.apache.org by jw...@apache.org on 2013/01/17 15:52:04 UTC

git commit: CRUNCH-146: Remove extension checking from AvroInputFormat. Contributed by Dave Beech.

Updated Branches:
  refs/heads/master 438e36a38 -> 5fe2f68b7


CRUNCH-146: Remove extension checking from AvroInputFormat. Contributed by Dave Beech.


Project: http://git-wip-us.apache.org/repos/asf/incubator-crunch/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-crunch/commit/5fe2f68b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-crunch/tree/5fe2f68b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-crunch/diff/5fe2f68b

Branch: refs/heads/master
Commit: 5fe2f68b79aa5cd21756619cdc76764b7d502aa5
Parents: 438e36a
Author: Josh Wills <jw...@apache.org>
Authored: Thu Jan 17 06:41:51 2013 -0800
Committer: Josh Wills <jw...@apache.org>
Committed: Thu Jan 17 06:49:53 2013 -0800

----------------------------------------------------------------------
 .../apache/crunch/types/avro/AvroInputFormat.java  |   17 ---------------
 1 files changed, 0 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/5fe2f68b/crunch/src/main/java/org/apache/crunch/types/avro/AvroInputFormat.java
----------------------------------------------------------------------
diff --git a/crunch/src/main/java/org/apache/crunch/types/avro/AvroInputFormat.java b/crunch/src/main/java/org/apache/crunch/types/avro/AvroInputFormat.java
index 59c1862..b8bbebd 100644
--- a/crunch/src/main/java/org/apache/crunch/types/avro/AvroInputFormat.java
+++ b/crunch/src/main/java/org/apache/crunch/types/avro/AvroInputFormat.java
@@ -18,34 +18,18 @@
 package org.apache.crunch.types.avro;
 
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
 
 import org.apache.avro.Schema;
 import org.apache.avro.mapred.AvroJob;
 import org.apache.avro.mapred.AvroWrapper;
-import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.io.NullWritable;
 import org.apache.hadoop.mapreduce.InputSplit;
-import org.apache.hadoop.mapreduce.JobContext;
 import org.apache.hadoop.mapreduce.RecordReader;
 import org.apache.hadoop.mapreduce.TaskAttemptContext;
 import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
 
 /** An {@link org.apache.hadoop.mapreduce.InputFormat} for Avro data files. */
 public class AvroInputFormat<T> extends FileInputFormat<AvroWrapper<T>, NullWritable> {
-
-  @Override
-  protected List<FileStatus> listStatus(JobContext job) throws IOException {
-    List<FileStatus> result = new ArrayList<FileStatus>();
-    for (FileStatus file : super.listStatus(job)) {
-      if (file.getPath().getName().endsWith(org.apache.avro.mapred.AvroOutputFormat.EXT)) {
-        result.add(file);
-      }
-    }
-    return result;
-  }
-
   @Override
   public RecordReader<AvroWrapper<T>, NullWritable> createRecordReader(InputSplit split, TaskAttemptContext context)
       throws IOException, InterruptedException {
@@ -54,5 +38,4 @@ public class AvroInputFormat<T> extends FileInputFormat<AvroWrapper<T>, NullWrit
     Schema schema = new Schema.Parser().parse(jsonSchema);
     return new AvroRecordReader<T>(schema);
   }
-
 }