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
IOException
public float getProgress() throws IOException
getProgress
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Writable>
IOException
public long getPos() throws IOException
IOException
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.hadoop.io.Writable>
IOException
public 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>
IOException
InterruptedException
public 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>
IOException
InterruptedException
public 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>
IOException
InterruptedException
public boolean nextKeyValue() throws IOException, InterruptedException
nextKeyValue
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Writable>
IOException
InterruptedException
Copyright © 2007-2017 The Apache Software Foundation