public class PigAvroRecordReader
extends org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Writable>
| Constructor and Description |
|---|
PigAvroRecordReader(org.apache.hadoop.mapreduce.TaskAttemptContext context,
org.apache.hadoop.mapreduce.lib.input.FileSplit split,
org.apache.avro.Schema readerSchema,
boolean ignoreBadFiles,
Map<org.apache.hadoop.fs.Path,Map<Integer,Integer>> schemaToMergedSchemaMap,
boolean useMultipleSchemas)
constructor to initialize input and avro data reader
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.apache.hadoop.io.NullWritable |
getCurrentKey() |
org.apache.hadoop.io.Writable |
getCurrentValue() |
long |
getPos() |
float |
getProgress() |
void |
initialize(org.apache.hadoop.mapreduce.InputSplit arg0,
org.apache.hadoop.mapreduce.TaskAttemptContext arg1) |
boolean |
nextKeyValue() |
protected Tuple |
wrapAsTuple(Object in)
Wrap non-tuple value as a tuple
|
public PigAvroRecordReader(org.apache.hadoop.mapreduce.TaskAttemptContext context,
org.apache.hadoop.mapreduce.lib.input.FileSplit split,
org.apache.avro.Schema readerSchema,
boolean ignoreBadFiles,
Map<org.apache.hadoop.fs.Path,Map<Integer,Integer>> schemaToMergedSchemaMap,
boolean useMultipleSchemas)
throws IOException
IOExceptionpublic float getProgress()
throws IOException
getProgress in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Writable>IOExceptionpublic long getPos()
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Writable>IOExceptionpublic org.apache.hadoop.io.NullWritable getCurrentKey()
throws IOException,
InterruptedException
getCurrentKey in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Writable>IOExceptionInterruptedExceptionpublic org.apache.hadoop.io.Writable getCurrentValue()
throws IOException,
InterruptedException
getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Writable>IOExceptionInterruptedExceptionpublic void initialize(org.apache.hadoop.mapreduce.InputSplit arg0,
org.apache.hadoop.mapreduce.TaskAttemptContext arg1)
throws IOException,
InterruptedException
initialize in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Writable>IOExceptionInterruptedExceptionpublic boolean nextKeyValue()
throws IOException,
InterruptedException
nextKeyValue in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Writable>IOExceptionInterruptedExceptionCopyright © 2007-2017 The Apache Software Foundation