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,
Map<org.apache.hadoop.fs.Path,Map<Integer,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 List<org.apache.hadoop.fs.FileStatus> |
listStatus(org.apache.hadoop.mapreduce.JobContext job) |
addInputPath, addInputPathRecursively, addInputPaths, computeSplitSize, getBlockIndex, getFormatMinSplitSize, getInputDirRecursive, getInputPathFilter, getInputPaths, getMaxSplitSize, getMinSplitSize, getSplits, isSplitable, makeSplit, makeSplit, setInputDirRecursive, setInputPathFilter, setInputPaths, setInputPaths, setMaxInputSplitSize, setMinInputSplitSize
public PigAvroInputFormat()
public PigAvroInputFormat(org.apache.avro.Schema readerSchema, boolean ignoreBadFiles, Map<org.apache.hadoop.fs.Path,Map<Integer,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 IOException, InterruptedException
createRecordReader
in class org.apache.hadoop.mapreduce.InputFormat<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Writable>
IOException
InterruptedException
protected List<org.apache.hadoop.fs.FileStatus> listStatus(org.apache.hadoop.mapreduce.JobContext job) throws IOException
listStatus
in class org.apache.hadoop.mapreduce.lib.input.FileInputFormat<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Writable>
IOException
Copyright © 2007-2012 The Apache Software Foundation