org.apache.giraph.bsp
Class BspInputSplit

java.lang.Object
  extended by org.apache.hadoop.mapreduce.InputSplit
      extended by org.apache.giraph.bsp.BspInputSplit
All Implemented Interfaces:
org.apache.hadoop.io.Writable

public class BspInputSplit
extends org.apache.hadoop.mapreduce.InputSplit
implements org.apache.hadoop.io.Writable

This InputSplit will not give any ordering or location data. It is used internally by BspInputFormat (which determines how many tasks to run the application on). Users should not use this directly.


Constructor Summary
BspInputSplit()
          Reflection constructor.
BspInputSplit(int splitIndex, int numSplits)
          Constructor used by BspInputFormat.
 
Method Summary
 long getLength()
           
 String[] getLocations()
           
 int getNumSplits()
          Get the number of splits for this application.
 int getSplitIndex()
          Get the index of this split.
 void readFields(DataInput in)
           
 String toString()
           
 void write(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BspInputSplit

public BspInputSplit()
Reflection constructor.


BspInputSplit

public BspInputSplit(int splitIndex,
                     int numSplits)
Constructor used by BspInputFormat.

Parameters:
splitIndex - Index of this split.
numSplits - Total number of splits.
Method Detail

getLength

public long getLength()
               throws IOException,
                      InterruptedException
Specified by:
getLength in class org.apache.hadoop.mapreduce.InputSplit
Throws:
IOException
InterruptedException

getLocations

public String[] getLocations()
                      throws IOException,
                             InterruptedException
Specified by:
getLocations in class org.apache.hadoop.mapreduce.InputSplit
Throws:
IOException
InterruptedException

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

getSplitIndex

public int getSplitIndex()
Get the index of this split.

Returns:
Index of this split.

getNumSplits

public int getNumSplits()
Get the number of splits for this application.

Returns:
Total number of splits.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011-2013 The Apache Software Foundation. All Rights Reserved.