public class AvroRecordReader<T> extends Object implements org.apache.hadoop.mapred.RecordReader<AvroWrapper<T>,org.apache.hadoop.io.NullWritable>
RecordReader
for Avro data files.Modifier | Constructor and Description |
---|---|
protected |
AvroRecordReader(FileReader<T> reader,
org.apache.hadoop.mapred.FileSplit split) |
|
AvroRecordReader(org.apache.hadoop.mapred.JobConf job,
org.apache.hadoop.mapred.FileSplit split) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
AvroWrapper<T> |
createKey() |
org.apache.hadoop.io.NullWritable |
createValue() |
long |
getPos() |
float |
getProgress() |
boolean |
next(AvroWrapper<T> wrapper,
org.apache.hadoop.io.NullWritable ignore) |
public AvroRecordReader(org.apache.hadoop.mapred.JobConf job, org.apache.hadoop.mapred.FileSplit split) throws IOException
IOException
protected AvroRecordReader(FileReader<T> reader, org.apache.hadoop.mapred.FileSplit split) throws IOException
IOException
public AvroWrapper<T> createKey()
createKey
in interface org.apache.hadoop.mapred.RecordReader<AvroWrapper<T>,org.apache.hadoop.io.NullWritable>
public org.apache.hadoop.io.NullWritable createValue()
createValue
in interface org.apache.hadoop.mapred.RecordReader<AvroWrapper<T>,org.apache.hadoop.io.NullWritable>
public boolean next(AvroWrapper<T> wrapper, org.apache.hadoop.io.NullWritable ignore) throws IOException
next
in interface org.apache.hadoop.mapred.RecordReader<AvroWrapper<T>,org.apache.hadoop.io.NullWritable>
IOException
public float getProgress() throws IOException
getProgress
in interface org.apache.hadoop.mapred.RecordReader<AvroWrapper<T>,org.apache.hadoop.io.NullWritable>
IOException
public long getPos() throws IOException
getPos
in interface org.apache.hadoop.mapred.RecordReader<AvroWrapper<T>,org.apache.hadoop.io.NullWritable>
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface org.apache.hadoop.mapred.RecordReader<AvroWrapper<T>,org.apache.hadoop.io.NullWritable>
IOException
Copyright © 2009–2021 The Apache Software Foundation. All rights reserved.