edu.umd.cloud9.collection
Class XMLInputFormatOld.XMLRecordReader

java.lang.Object
  extended by edu.umd.cloud9.collection.XMLInputFormatOld.XMLRecordReader
All Implemented Interfaces:
RecordReader<LongWritable,Text>
Enclosing class:
XMLInputFormatOld

public static class XMLInputFormatOld.XMLRecordReader
extends Object
implements RecordReader<LongWritable,Text>

Simple RecordReader for XML documents (org.apache.hadoop.mapred API). Recognizes begin-of-document and end-of-document tags only: everything between those delimiting tags is returned in a Text object.

Author:
Jimmy Lin

Constructor Summary
XMLInputFormatOld.XMLRecordReader(FileSplit split, JobConf jobConf)
           
 
Method Summary
 void close()
           
 LongWritable createKey()
           
 Text createValue()
           
 long getEnd()
           
 long getPos()
           
 float getProgress()
           
 long getStart()
           
 boolean next(LongWritable key, Text value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLInputFormatOld.XMLRecordReader

public XMLInputFormatOld.XMLRecordReader(FileSplit split,
                                         JobConf jobConf)
                                  throws IOException
Throws:
IOException
Method Detail

next

public boolean next(LongWritable key,
                    Text value)
             throws IOException
Specified by:
next in interface RecordReader<LongWritable,Text>
Throws:
IOException

createKey

public LongWritable createKey()
Specified by:
createKey in interface RecordReader<LongWritable,Text>

createValue

public Text createValue()
Specified by:
createValue in interface RecordReader<LongWritable,Text>

getPos

public long getPos()
            throws IOException
Specified by:
getPos in interface RecordReader<LongWritable,Text>
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface RecordReader<LongWritable,Text>
Throws:
IOException

getProgress

public float getProgress()
                  throws IOException
Specified by:
getProgress in interface RecordReader<LongWritable,Text>
Throws:
IOException

getStart

public long getStart()

getEnd

public long getEnd()