p2pMapReduce.mapreduceModule.input
Class InputSplit

java.lang.Object
  extended by p2pMapReduce.mapreduceModule.input.InputSplit
All Implemented Interfaces:
Writable
Direct Known Subclasses:
TextFileInputSplit, TextFileInputSplit_old

public abstract class InputSplit
extends java.lang.Object
implements Writable

InputSplit represents the data to be processed by an individual Mapper.

Typically, it presents a byte-oriented view on the input and is the responsibility of RecordReader of the job to process this and present a record-oriented view.

See Also:
InputFormat, RecordReader

Field Summary
static java.lang.String DESCRIPTOR_SUFFIX
          The suffix to add to the input split file name to obtain the descriptor file name
 
Constructor Summary
InputSplit()
           
 
Method Summary
abstract  long getLength()
          Get the size of the split, so that the input splits can be sorted by size.
abstract  java.lang.String[] getLocations()
          Get the list of nodes by name where the data for the split would be local.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface p2pMapReduce.mapreduceModule.io.Writable
readFields, write
 

Field Detail

DESCRIPTOR_SUFFIX

public static final java.lang.String DESCRIPTOR_SUFFIX
The suffix to add to the input split file name to obtain the descriptor file name

See Also:
Constant Field Values
Constructor Detail

InputSplit

public InputSplit()
Method Detail

getLength

public abstract long getLength()
                        throws java.io.IOException,
                               java.lang.InterruptedException
Get the size of the split, so that the input splits can be sorted by size.

Returns:
the number of bytes in the split
Throws:
java.io.IOException
java.lang.InterruptedException

getLocations

public abstract java.lang.String[] getLocations()
                                         throws java.io.IOException,
                                                java.lang.InterruptedException
Get the list of nodes by name where the data for the split would be local. The locations do not need to be serialized.

Returns:
a new array of the node nodes.
Throws:
java.io.IOException
java.lang.InterruptedException