mapred
Class CustomRecordReader

java.lang.Object
  extended by mapred.CustomRecordReader
All Implemented Interfaces:
org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,Record>

public class CustomRecordReader
extends java.lang.Object
implements org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,Record>

Provides an implementation of a common record reader for all MapReduce jobs in the distributed application. Each record has a fixed size, defined in Record.

Author:
vohuudtr

Constructor Summary
CustomRecordReader(org.apache.hadoop.mapred.JobConf job, org.apache.hadoop.mapred.FileSplit split)
           
 
Method Summary
 void close()
           
 org.apache.hadoop.io.LongWritable createKey()
           
 Record createValue()
           
 long getPos()
           
 float getProgress()
           
 boolean next(org.apache.hadoop.io.LongWritable key, Record record)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomRecordReader

public CustomRecordReader(org.apache.hadoop.mapred.JobConf job,
                          org.apache.hadoop.mapred.FileSplit split)
                   throws java.io.IOException
Throws:
java.io.IOException
Method Detail

close

public void close()
           throws java.io.IOException
Specified by:
close in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,Record>
Throws:
java.io.IOException

createKey

public org.apache.hadoop.io.LongWritable createKey()
Specified by:
createKey in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,Record>

createValue

public Record createValue()
Specified by:
createValue in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,Record>

getPos

public long getPos()
            throws java.io.IOException
Specified by:
getPos in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,Record>
Throws:
java.io.IOException

getProgress

public float getProgress()
                  throws java.io.IOException
Specified by:
getProgress in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,Record>
Throws:
java.io.IOException

next

public boolean next(org.apache.hadoop.io.LongWritable key,
                    Record record)
             throws java.io.IOException
Specified by:
next in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,Record>
Throws:
java.io.IOException