public class InputStreamInputSplit extends java.lang.Object implements InputSplit
Constructor and Description |
---|
InputStreamInputSplit(java.io.InputStream is) |
InputStreamInputSplit(java.io.InputStream is,
java.io.File path)
Instantiate with the given
file as a uri
|
InputStreamInputSplit(java.io.InputStream is,
java.lang.String path)
Instantiate with the given
file as a uri
|
InputStreamInputSplit(java.io.InputStream is,
java.net.URI path)
Instantiate with the given
file as a uri
|
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getIs() |
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.
|
void |
setIs(java.io.InputStream is) |
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 InputStreamInputSplit(java.io.InputStream is, java.lang.String path)
is
- the input stream to usepath
- the path to usepublic InputStreamInputSplit(java.io.InputStream is, java.io.File path)
is
- the input stream to usepath
- the path to usepublic InputStreamInputSplit(java.io.InputStream is, java.net.URI path)
is
- the input stream to usepath
- the path to usepublic InputStreamInputSplit(java.io.InputStream is)
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.io.InputStream getIs()
public void setIs(java.io.InputStream is)
public double toDouble()
Writable
public float toFloat()
Writable
public int toInt()
Writable