public class CollectionInputSplit extends BaseInputSplit
length, locations
Constructor and Description |
---|
CollectionInputSplit(Collection<URI> list) |
Modifier and Type | Method and Description |
---|---|
long |
length()
Length of the split
|
URI[] |
locations()
Locations of the splits
|
void |
readFields(DataInput in)
Deserialize the fields of this object from
in . |
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(DataOutput out)
Serialize the fields of this object to
out . |
sample
public CollectionInputSplit(Collection<URI> list)
public long length()
InputSplit
length
in interface InputSplit
length
in class BaseInputSplit
public URI[] locations()
InputSplit
locations
in interface InputSplit
locations
in class BaseInputSplit
public void write(DataOutput out) throws IOException
Writable
out
.out
- DataOuput
to serialize this object into.IOException
public void readFields(DataInput in) throws IOException
Writable
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
in
- DataInput
to deseriablize this object from.IOException
public double toDouble()
Writable
toDouble
in interface Writable
toDouble
in class BaseInputSplit
public float toFloat()
Writable
toFloat
in interface Writable
toFloat
in class BaseInputSplit
public int toInt()
Writable
toInt
in interface Writable
toInt
in class BaseInputSplit
public long toLong()
Writable
toLong
in interface Writable
toLong
in class BaseInputSplit
Copyright © 2016. All rights reserved.