public final class AvroArrayReader
extends org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
Constructor and Description |
---|
AvroArrayReader(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 AvroArrayReader(org.apache.avro.Schema s)
s
- The input schema.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
java.io.IOException
public org.apache.avro.generic.GenericData.Record getCurrentValue() throws java.io.IOException, java.lang.InterruptedException
getCurrentValue
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
java.io.IOException
- when an IO error occursjava.lang.InterruptedException
- when interruptedpublic org.apache.hadoop.io.NullWritable getCurrentKey() throws java.io.IOException, java.lang.InterruptedException
getCurrentKey
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
java.io.IOException
java.lang.InterruptedException
public float getProgress() throws java.io.IOException, java.lang.InterruptedException
getProgress
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
java.io.IOException
java.lang.InterruptedException
public void initialize(org.apache.hadoop.mapreduce.InputSplit isplit, org.apache.hadoop.mapreduce.TaskAttemptContext tc) throws java.io.IOException, java.lang.InterruptedException
initialize
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
java.io.IOException
java.lang.InterruptedException
public boolean nextKeyValue() throws java.io.IOException, java.lang.InterruptedException
nextKeyValue
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
java.io.IOException
java.lang.InterruptedException
Copyright © 2007-2017 The Apache Software Foundation