public class PigAvroInputFormat
extends org.apache.hadoop.mapreduce.lib.input.FileInputFormat<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Writable>
Constructor and Description |
---|
PigAvroInputFormat()
empty constructor
|
PigAvroInputFormat(org.apache.avro.Schema readerSchema,
boolean ignoreBadFiles,
java.util.Map<org.apache.hadoop.fs.Path,java.util.Map<java.lang.Integer,java.lang.Integer>> schemaToMergedSchemaMap,
boolean useMultipleSchemas)
constructor called by AvroStorage to pass in schema and ignoreBadFiles.
|
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Writable> |
createRecordReader(org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
Create and return an avro record reader.
|
protected java.util.List<org.apache.hadoop.fs.FileStatus> |
listStatus(org.apache.hadoop.mapreduce.JobContext job) |
addInputPath, addInputPaths, computeSplitSize, getBlockIndex, getFormatMinSplitSize, getInputPathFilter, getInputPaths, getMaxSplitSize, getMinSplitSize, getSplits, isSplitable, setInputPathFilter, setInputPaths, setInputPaths, setMaxInputSplitSize, setMinInputSplitSize
public PigAvroInputFormat()
public PigAvroInputFormat(org.apache.avro.Schema readerSchema, boolean ignoreBadFiles, java.util.Map<org.apache.hadoop.fs.Path,java.util.Map<java.lang.Integer,java.lang.Integer>> schemaToMergedSchemaMap, boolean useMultipleSchemas)
readerSchema
- reader schemaignoreBadFiles
- whether ignore corrupted files during loadschemaToMergedSchemaMap
- map that associates each input record
with a remapping of its fields relative to the merged schemapublic org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Writable> createRecordReader(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context) throws java.io.IOException, java.lang.InterruptedException
createRecordReader
in class org.apache.hadoop.mapreduce.InputFormat<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Writable>
java.io.IOException
java.lang.InterruptedException
protected java.util.List<org.apache.hadoop.fs.FileStatus> listStatus(org.apache.hadoop.mapreduce.JobContext job) throws java.io.IOException
listStatus
in class org.apache.hadoop.mapreduce.lib.input.FileInputFormat<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Writable>
java.io.IOException
Copyright © 2007-2012 The Apache Software Foundation