org.apache.hadoop.mapred
Class SequenceFileRecordReader

java.lang.Object
  extended by org.apache.hadoop.mapred.SequenceFileRecordReader
All Implemented Interfaces:
RecordReader

public class SequenceFileRecordReader
extends Object
implements RecordReader

An RecordReader for SequenceFiles.


Constructor Summary
SequenceFileRecordReader(Configuration conf, FileSplit split)
           
 
Method Summary
 void close()
          Close this to future operations.
 Class getKeyClass()
          The class of key that must be passed to next(Writable,Writable)..
 long getPos()
          Returns the current position in the input.
 Class getValueClass()
          The class of value that must be passed to next(Writable,Writable)..
 boolean next(Writable key, Writable value)
          Reads the next key/value pair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceFileRecordReader

public SequenceFileRecordReader(Configuration conf,
                                FileSplit split)
                         throws IOException
Throws:
IOException
Method Detail

getKeyClass

public Class getKeyClass()
The class of key that must be passed to next(Writable,Writable)..


getValueClass

public Class getValueClass()
The class of value that must be passed to next(Writable,Writable)..


next

public boolean next(Writable key,
                    Writable value)
             throws IOException
Description copied from interface: RecordReader
Reads the next key/value pair.

Specified by:
next in interface RecordReader
Parameters:
key - the key to read data into
value - the value to read data into
Returns:
true iff a key/value was read, false if at EOF
Throws:
IOException
See Also:
Writable.readFields(DataInput)

getPos

public long getPos()
            throws IOException
Description copied from interface: RecordReader
Returns the current position in the input.

Specified by:
getPos in interface RecordReader
Throws:
IOException

close

public void close()
           throws IOException
Description copied from interface: RecordReader
Close this to future operations.

Specified by:
close in interface RecordReader
Throws:
IOException


Copyright © 2006 The Apache Software Foundation