edu.umd.cloud9.collection
Class XMLInputFormatOld

java.lang.Object
  extended by org.apache.hadoop.mapred.FileInputFormat<LongWritable,Text>
      extended by org.apache.hadoop.mapred.TextInputFormat
          extended by edu.umd.cloud9.collection.XMLInputFormatOld
All Implemented Interfaces:
InputFormat<LongWritable,Text>, JobConfigurable

public class XMLInputFormatOld
extends TextInputFormat

A simple InputFormat for XML documents (org.apache.hadoop.mapred API). The class recognizes begin-of-document and end-of-document tags only: everything between those delimiting tags is returned in an uninterpreted Text object.

Author:
Jimmy Lin

Nested Class Summary
static class XMLInputFormatOld.XMLRecordReader
          Simple RecordReader for XML documents (org.apache.hadoop.mapred API).
 
Field Summary
static String END_TAG_KEY
           
static String START_TAG_KEY
           
 
Fields inherited from class org.apache.hadoop.mapred.FileInputFormat
LOG
 
Constructor Summary
XMLInputFormatOld()
           
 
Method Summary
 void configure(JobConf jobConf)
           
 RecordReader<LongWritable,Text> getRecordReader(InputSplit inputSplit, JobConf jobConf, Reporter reporter)
           
 
Methods inherited from class org.apache.hadoop.mapred.FileInputFormat
addInputPath, addInputPaths, getInputPathFilter, getInputPaths, getSplits, setInputPathFilter, setInputPaths, setInputPaths
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

START_TAG_KEY

public static final String START_TAG_KEY
See Also:
Constant Field Values

END_TAG_KEY

public static final String END_TAG_KEY
See Also:
Constant Field Values
Constructor Detail

XMLInputFormatOld

public XMLInputFormatOld()
Method Detail

configure

public void configure(JobConf jobConf)
Specified by:
configure in interface JobConfigurable
Overrides:
configure in class TextInputFormat

getRecordReader

public RecordReader<LongWritable,Text> getRecordReader(InputSplit inputSplit,
                                                       JobConf jobConf,
                                                       Reporter reporter)
                                                throws IOException
Specified by:
getRecordReader in interface InputFormat<LongWritable,Text>
Overrides:
getRecordReader in class TextInputFormat
Throws:
IOException