5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-16 00:41:23 +08:00

SQOOP-1282: Consider avro files even if they carry no extension

(Harsh J via Jarek Jarcec Cecho)
This commit is contained in:
Jarek Jarcec Cecho 2014-02-08 14:37:37 -08:00
parent c913f77f28
commit d37bd1168c
2 changed files with 1 additions and 14 deletions

View File

@ -34,18 +34,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,

View File

@ -126,9 +126,8 @@ public Schema getColumnAvroSchema() {
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()) {