public class StringSplit extends java.lang.Object implements InputSplit
Constructor and Description |
---|
StringSplit(java.lang.String data) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getData() |
long |
length()
Length of the split
|
java.net.URI[] |
locations()
Locations of the splits
|
java.util.Iterator<java.net.URI> |
locationsIterator() |
java.util.Iterator<java.lang.String> |
locationsPathIterator() |
void |
readFields(java.io.DataInput in)
Deserialize the fields of this object from
in . |
void |
reset()
Reset the InputSplit without reinitializing it from scratch.
|
double |
toDouble()
Convert Writable to double.
|
float |
toFloat()
Convert Writable to float.
|
int |
toInt()
Convert Writable to int.
|
long |
toLong()
Convert Writable to long.
|
void |
write(java.io.DataOutput out)
Serialize the fields of this object to
out . |
public long length()
InputSplit
length
in interface InputSplit
public java.net.URI[] locations()
InputSplit
locations
in interface InputSplit
public java.util.Iterator<java.net.URI> locationsIterator()
locationsIterator
in interface InputSplit
public java.util.Iterator<java.lang.String> locationsPathIterator()
locationsPathIterator
in interface InputSplit
public void reset()
InputSplit
reset
in interface InputSplit
public void write(java.io.DataOutput out) throws java.io.IOException
Writable
out
.public void readFields(java.io.DataInput in) throws java.io.IOException
Writable
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields
in interface Writable
in
- DataInput
to deseriablize this object from.java.io.IOException
public java.lang.String getData()
public double toDouble()
Writable
public float toFloat()
Writable
public int toInt()
Writable