org.apache.hadoop.mapred.gridmix
Class SleepJob.SleepSplit
java.lang.Object
org.apache.hadoop.mapreduce.InputSplit
org.apache.hadoop.mapred.gridmix.SleepJob.SleepSplit
- All Implemented Interfaces:
- org.apache.hadoop.io.Writable
- Enclosing class:
- SleepJob
public static class SleepJob.SleepSplit
- extends InputSplit
- implements org.apache.hadoop.io.Writable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SleepJob.SleepSplit
public SleepJob.SleepSplit()
SleepJob.SleepSplit
public SleepJob.SleepSplit(int id,
long sleepDuration,
long[] reduceDurations,
int nMaps,
String[] locations)
write
public void write(DataOutput out)
throws IOException
- Specified by:
write
in interface org.apache.hadoop.io.Writable
- Throws:
IOException
readFields
public void readFields(DataInput in)
throws IOException
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Throws:
IOException
getLength
public long getLength()
- 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
getId
public int getId()
getNumMaps
public int getNumMaps()
getReduceDurations
public long getReduceDurations(int i)
getLocations
public String[] getLocations()
- 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:
- a new array of the node nodes.
Copyright © 2009 The Apache Software Foundation