Updated Branches: refs/heads/trunk c913f77f2 -> d37bd1168
SQOOP-1282: Consider avro files even if they carry no extension (Harsh J via Jarek Jarcec Cecho) Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/d37bd116 Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/d37bd116 Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/d37bd116 Branch: refs/heads/trunk Commit: d37bd1168c81e72f71bbdb7eedcf643f366e5b26 Parents: c913f77 Author: Jarek Jarcec Cecho <[email protected]> Authored: Sat Feb 8 14:37:37 2014 -0800 Committer: Jarek Jarcec Cecho <[email protected]> Committed: Sat Feb 8 14:37:37 2014 -0800 ---------------------------------------------------------------------- .../org/apache/sqoop/mapreduce/AvroInputFormat.java | 12 ------------ src/test/com/cloudera/sqoop/TestAvroExport.java | 3 +-- 2 files changed, 1 insertion(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/sqoop/blob/d37bd116/src/java/org/apache/sqoop/mapreduce/AvroInputFormat.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/sqoop/mapreduce/AvroInputFormat.java b/src/java/org/apache/sqoop/mapreduce/AvroInputFormat.java index 0d5c08e..81cca17 100644 --- a/src/java/org/apache/sqoop/mapreduce/AvroInputFormat.java +++ b/src/java/org/apache/sqoop/mapreduce/AvroInputFormat.java @@ -35,18 +35,6 @@ 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 { http://git-wip-us.apache.org/repos/asf/sqoop/blob/d37bd116/src/test/com/cloudera/sqoop/TestAvroExport.java ---------------------------------------------------------------------- diff --git a/src/test/com/cloudera/sqoop/TestAvroExport.java b/src/test/com/cloudera/sqoop/TestAvroExport.java index 7016826..db776e6 100644 --- a/src/test/com/cloudera/sqoop/TestAvroExport.java +++ b/src/test/com/cloudera/sqoop/TestAvroExport.java @@ -126,9 +126,8 @@ public class TestAvroExport extends ExportJobTestCase { protected void createAvroFile(int fileNum, int numRecords, ColumnGenerator... extraCols) throws IOException { - String ext = ".avro"; Path tablePath = getTablePath(); - Path filePath = new Path(tablePath, "part" + fileNum + ext); + Path filePath = new Path(tablePath, "part" + fileNum); Configuration conf = new Configuration(); if (!BaseSqoopTestCase.isOnPhysicalCluster()) {
