Found the answer to my own question and thought I would post it...
What I did was modify the HashPartitionerFactor as below. Hope this helps
someone else!
public class MyPartitionerFactory extends
HashPartitionerFactory<GraphVertexIndex, LongWritable, LongWritable,
GraphMessage> {
class WorkerPartitioner extends HashWorkerPartitioner<GraphVertexIndex,
LongWritable, LongWritable, GraphMessage> {
@Override
public PartitionOwner getPartitionOwner(GraphVertexIndex vertexId) {
return
partitionOwnerList.get(Math.abs(vertexId.getIndex().hashCode()) %
partitionOwnerList.size()); // Replace with your own partition function
}
}
@Override
public WorkerGraphPartitioner<GraphVertexIndex, LongWritable,
LongWritable, GraphMessage> createWorkerGraphPartitioner() {
return new WorkerPartitioner();
}
}