org.apache.hadoop.mapred.gridmix
Class SleepJob.SleepSplit

java.lang.Object
  extended by org.apache.hadoop.mapreduce.InputSplit
      extended by 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


Constructor Summary
SleepJob.SleepSplit()
           
SleepJob.SleepSplit(int id, long sleepDuration, long[] reduceDurations, int nMaps, String[] locations)
           
 
Method Summary
 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)
           
 void write(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SleepJob.SleepSplit

public SleepJob.SleepSplit()

SleepJob.SleepSplit

public SleepJob.SleepSplit(int id,
                           long sleepDuration,
                           long[] reduceDurations,
                           int nMaps,
                           String[] locations)
Method Detail

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