cgl.imr.data.file
Class FileDataPartitioner

java.lang.Object
  extended by cgl.imr.data.file.FileDataPartitioner
All Implemented Interfaces:
DataPartitioner

public class FileDataPartitioner
extends Object
implements DataPartitioner

Assign map tasks for a given file data partition.


Field Summary
protected  Map<Integer,NodePartitionPair> mapTasks
           
protected  int numMapTasks
           
 
Constructor Summary
FileDataPartitioner(int numMapTasks)
           
 
Method Summary
 void assignPartitions(PartitionInfo partitionInfo)
          Assign data partitions - files - to map tasks.
 int getAssignedNode(int mapTaskNumber)
          Returns a node where the given map task is scheduled to run.
 DataPartition getPartition(int mapTaskNumber)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapTasks

protected Map<Integer,NodePartitionPair> mapTasks

numMapTasks

protected int numMapTasks
Constructor Detail

FileDataPartitioner

public FileDataPartitioner(int numMapTasks)
Method Detail

assignPartitions

public void assignPartitions(PartitionInfo partitionInfo)
                      throws DataPartitionException
Assign data partitions - files - to map tasks.

Specified by:
assignPartitions in interface DataPartitioner
Throws:
DataPartitionException

getAssignedNode

public int getAssignedNode(int mapTaskNumber)
                    throws DataPartitionException
Returns a node where the given map task is scheduled to run.

Specified by:
getAssignedNode in interface DataPartitioner
Throws:
DataPartitionException

getPartition

public DataPartition getPartition(int mapTaskNumber)
Specified by:
getPartition in interface DataPartitioner


For comments and suggestions please send e-mail to