com.intel.hadoop.graphbuilder.partition.strategy
Class RandomIngress<VidType>

java.lang.Object
  extended by com.intel.hadoop.graphbuilder.partition.strategy.RandomIngress<VidType>
Type Parameters:
VidType -
All Implemented Interfaces:
Ingress<VidType>

public class RandomIngress<VidType>
extends java.lang.Object
implements Ingress<VidType>

Random assigns a partition id for each edge.


Constructor Summary
RandomIngress(int numProcs)
          Default constructor with numProcs set.
 
Method Summary
 short computePid(VidType source, VidType target)
           
 int numProcs()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomIngress

public RandomIngress(int numProcs)
Default constructor with numProcs set.

Parameters:
numProcs -
Method Detail

computePid

public short computePid(VidType source,
                        VidType target)
Specified by:
computePid in interface Ingress<VidType>
Returns:
the partition id for the edge.

numProcs

public int numProcs()
Specified by:
numProcs in interface Ingress<VidType>
Returns:
number of total partitions.