public static class SleepJob.SleepSplit extends InputSplit implements Writable
Constructor and Description |
---|
SleepJob.SleepSplit() |
SleepJob.SleepSplit(int id,
long sleepDuration,
long[] reduceDurations,
int nMaps,
String[] locations) |
Modifier and Type | Method and Description |
---|---|
int |
getId() |
long |
getLength()
Get the size of the split, so that the input splits can be sorted by size.
|
String[] |
getLocations()
Get the list of nodes by name where the data for the split would be local.
|
int |
getNumMaps() |
long |
getReduceDurations(int i) |
void |
readFields(DataInput in)
Deserialize the fields of this object from
in . |
void |
write(DataOutput out)
Serialize the fields of this object to
out . |
public SleepJob.SleepSplit()
public SleepJob.SleepSplit(int id, long sleepDuration, long[] reduceDurations, int nMaps, String[] locations)
public void write(DataOutput out) throws IOException
Writable
out
.write
in interface Writable
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.
readFields
in interface Writable
in
- DataInput
to deseriablize this object from.IOException
public long getLength()
InputSplit
getLength
in class InputSplit
public int getId()
public int getNumMaps()
public long getReduceDurations(int i)
public String[] getLocations()
InputSplit
getLocations
in class InputSplit
Copyright © 2013 Apache Software Foundation. All rights reserved.