public final class AvroRecordReader
extends org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
Constructor and Description |
---|
AvroRecordReader(org.apache.avro.Schema s)
Creates new instance of AvroRecordReader.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
org.apache.hadoop.io.NullWritable |
getCurrentKey() |
org.apache.avro.generic.GenericData.Record |
getCurrentValue()
Returns current value.
|
float |
getProgress() |
void |
initialize(org.apache.hadoop.mapreduce.InputSplit isplit,
org.apache.hadoop.mapreduce.TaskAttemptContext tc) |
boolean |
nextKeyValue() |
public AvroRecordReader(org.apache.avro.Schema s)
s
- The input schema.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
IOException
public org.apache.avro.generic.GenericData.Record getCurrentValue() throws IOException, InterruptedException
getCurrentValue
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
IOException
- when an IO error occursInterruptedException
- when interruptedpublic org.apache.hadoop.io.NullWritable getCurrentKey() throws IOException, InterruptedException
getCurrentKey
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
IOException
InterruptedException
public float getProgress() throws IOException, InterruptedException
getProgress
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
IOException
InterruptedException
public void initialize(org.apache.hadoop.mapreduce.InputSplit isplit, org.apache.hadoop.mapreduce.TaskAttemptContext tc) throws IOException, InterruptedException
initialize
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
IOException
InterruptedException
public boolean nextKeyValue() throws IOException, InterruptedException
nextKeyValue
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
IOException
InterruptedException
Copyright © 2007-2017 The Apache Software Foundation