V
- vertexValue typeE
- edgeValue typepublic class LongMappingStorePartitionerFactory<V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable> extends GraphPartitionerFactory<org.apache.hadoop.io.LongWritable,V,E>
Modifier and Type | Field and Description |
---|---|
protected LocalData<org.apache.hadoop.io.LongWritable,V,E,? extends org.apache.hadoop.io.Writable> |
localData
Local Data that supplies the mapping store
|
Constructor and Description |
---|
LongMappingStorePartitionerFactory() |
Modifier and Type | Method and Description |
---|---|
int |
getPartition(org.apache.hadoop.io.LongWritable id,
int partitionCount,
int workerCount)
Calculates in which partition current vertex belongs to,
from interval [0, partitionCount).
|
int |
getWorker(int partition,
int partitionCount,
int workerCount)
Calculates worker that should be responsible for passed partition.
|
void |
initialize(LocalData<org.apache.hadoop.io.LongWritable,V,E,? extends org.apache.hadoop.io.Writable> localData)
Use some local data present in the worker
|
createMasterGraphPartitioner, createWorkerGraphPartitioner, getPartitionInRange, getPartitionInRange
getConf, setConf
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConf
setConf
public void initialize(LocalData<org.apache.hadoop.io.LongWritable,V,E,? extends org.apache.hadoop.io.Writable> localData)
GraphPartitionerFactoryInterface
initialize
in interface GraphPartitionerFactoryInterface<org.apache.hadoop.io.LongWritable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
initialize
in class GraphPartitionerFactory<org.apache.hadoop.io.LongWritable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
localData
- localData present in the workerpublic int getPartition(org.apache.hadoop.io.LongWritable id, int partitionCount, int workerCount)
GraphPartitionerFactory
getPartition
in class GraphPartitionerFactory<org.apache.hadoop.io.LongWritable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
id
- Vertex idpartitionCount
- Number of partitionsworkerCount
- Number of workerspublic int getWorker(int partition, int partitionCount, int workerCount)
GraphPartitionerFactory
getWorker
in class GraphPartitionerFactory<org.apache.hadoop.io.LongWritable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
partition
- Current partitionpartitionCount
- Number of partitionsworkerCount
- Number of workersCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.