org.apache.hadoop.examples.pi
Class DistSum.Machine.SummationSplit

java.lang.Object
  extended by org.apache.hadoop.mapreduce.InputSplit
      extended by org.apache.hadoop.examples.pi.DistSum.Machine.SummationSplit
All Implemented Interfaces:
Container<Summation>, org.apache.hadoop.io.Writable
Enclosing class:
DistSum.Machine

public static final class DistSum.Machine.SummationSplit
extends InputSplit
implements org.apache.hadoop.io.Writable, Container<Summation>

Split for the summations


Constructor Summary
DistSum.Machine.SummationSplit()
           
 
Method Summary
 Summation getElement()
          
 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.
 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

DistSum.Machine.SummationSplit

public DistSum.Machine.SummationSplit()
Method Detail

getElement

public Summation getElement()

Specified by:
getElement in interface Container<Summation>
Returns:
The contained element.

getLength

public long getLength()
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

getLocations

public String[] getLocations()
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.

readFields

public void readFields(DataInput in)
                throws IOException

Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException

Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException


Copyright © 2009 The Apache Software Foundation