org.apache.avro.mapred
Class AvroAsTextInputFormat
java.lang.Object
org.apache.hadoop.mapred.FileInputFormat<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
org.apache.avro.mapred.AvroAsTextInputFormat
- All Implemented Interfaces:
- org.apache.hadoop.mapred.InputFormat<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
public class AvroAsTextInputFormat
- extends org.apache.hadoop.mapred.FileInputFormat<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
An InputFormat for Avro data files, which
converts each datum to string form in the input key. The input value is
always empty. The string representation is
JSON.
This InputFormat is useful for applications
that wish to process Avro data using tools like MapReduce Streaming.
| Nested classes/interfaces inherited from class org.apache.hadoop.mapred.FileInputFormat |
org.apache.hadoop.mapred.FileInputFormat.Counter |
| Fields inherited from class org.apache.hadoop.mapred.FileInputFormat |
LOG |
|
Method Summary |
org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text> |
getRecordReader(org.apache.hadoop.mapred.InputSplit split,
org.apache.hadoop.mapred.JobConf job,
org.apache.hadoop.mapred.Reporter reporter)
|
protected org.apache.hadoop.fs.FileStatus[] |
listStatus(org.apache.hadoop.mapred.JobConf job)
|
| Methods inherited from class org.apache.hadoop.mapred.FileInputFormat |
addInputPath, addInputPaths, computeSplitSize, getBlockIndex, getInputPathFilter, getInputPaths, getSplitHosts, getSplits, isSplitable, setInputPathFilter, setInputPaths, setInputPaths, setMinSplitSize |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AvroAsTextInputFormat
public AvroAsTextInputFormat()
listStatus
protected org.apache.hadoop.fs.FileStatus[] listStatus(org.apache.hadoop.mapred.JobConf job)
throws IOException
- Overrides:
listStatus in class org.apache.hadoop.mapred.FileInputFormat<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
- Throws:
IOException
getRecordReader
public org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text> getRecordReader(org.apache.hadoop.mapred.InputSplit split,
org.apache.hadoop.mapred.JobConf job,
org.apache.hadoop.mapred.Reporter reporter)
throws IOException
- Specified by:
getRecordReader in interface org.apache.hadoop.mapred.InputFormat<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>- Specified by:
getRecordReader in class org.apache.hadoop.mapred.FileInputFormat<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
- Throws:
IOException
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.