p2pMapReduce.mapreduceModule.input
Class TextFileInputSplit
java.lang.Object
p2pMapReduce.mapreduceModule.input.InputSplit
p2pMapReduce.mapreduceModule.input.TextFileInputSplit
- All Implemented Interfaces:
- Writable
public class TextFileInputSplit
- extends InputSplit
Method Summary |
long |
append(java.io.BufferedReader br,
long bytesRemaining)
|
void |
close()
|
java.io.File |
getFile()
|
java.lang.String |
getInputFilePath()
|
long |
getLength()
Get the size of the split, so that the input splits can be sorted by size. |
java.lang.String[] |
getLocations()
Deprecated. not supported |
void |
readFields(java.io.DataInput in)
Deserialize the fields of this object from in . |
java.lang.String |
toString()
|
void |
write(java.io.DataOutput out)
Serialize the fields of this object to out . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LINE_SEPARATOR
public static final java.lang.String LINE_SEPARATOR
LINE_SEPARATOR_BYTES
public static int LINE_SEPARATOR_BYTES
TextFileInputSplit
public TextFileInputSplit()
TextFileInputSplit
public TextFileInputSplit(java.lang.String filePath,
java.lang.String inputFilePath)
throws java.io.FileNotFoundException,
java.io.IOException
- Throws:
java.io.FileNotFoundException
java.io.IOException
getFile
public java.io.File getFile()
getInputFilePath
public java.lang.String getInputFilePath()
append
public long append(java.io.BufferedReader br,
long bytesRemaining)
throws java.io.FileNotFoundException,
java.io.IOException
- Throws:
java.io.FileNotFoundException
java.io.IOException
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
getLength
public long getLength()
throws java.io.IOException,
java.lang.InterruptedException
- Description copied from class:
InputSplit
- Get the size of the split, so that the input splits can be sorted by size.
- Specified by:
getLength
in class InputSplit
- Returns:
- the number of bytes in the split
- Throws:
java.io.IOException
java.lang.InterruptedException
getLocations
public java.lang.String[] getLocations()
throws java.io.IOException,
java.lang.InterruptedException
- Deprecated. not supported
- Description copied from class:
InputSplit
- Get the list of nodes by name where the data for the split would be local.
The locations do not need to be serialized.
- Specified by:
getLocations
in class InputSplit
- Returns:
-
- Throws:
java.io.IOException
java.lang.InterruptedException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
write
public void write(java.io.DataOutput out)
throws java.io.IOException
- Description copied from interface:
Writable
- Serialize the fields of this object to
out
.
- Parameters:
out
- DataOuput
to serialize this object into.
- Throws:
java.io.IOException
readFields
public void readFields(java.io.DataInput in)
throws java.io.IOException
- Description copied from interface:
Writable
- Deserialize the fields of this object from
in
.
For efficiency, implementations should attempt to re-use storage in the
existing object where possible.
- Parameters:
in
- DataInput
to deseriablize this object from.
- Throws:
java.io.IOException