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:
parent
c913f77f28
commit
d37bd1168c
@ -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,
|
||||
|
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user