V
- Vertex value typeE
- Edge value typepublic class SimpleLongRangePartitionerFactory<V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable> extends GraphPartitionerFactory<org.apache.hadoop.io.LongWritable,V,E>
Constructor and Description |
---|
SimpleLongRangePartitionerFactory() |
Modifier and Type | Method and Description |
---|---|
protected int |
getPartition(org.apache.hadoop.io.LongWritable id,
int partitionCount)
Calculates in which partition current vertex belongs to,
from interval [0, partitionCount).
|
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 |
setConf(ImmutableClassesGiraphConfiguration conf)
Set the configuration to be used by this object.
|
createMasterGraphPartitioner, createWorkerGraphPartitioner, getPartitionInRange, getPartitionInRange, initialize
getConf
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConf
public 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 workersprotected int getPartition(org.apache.hadoop.io.LongWritable id, int partitionCount)
id
- Vertex idpartitionCount
- Number of partitionspublic 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 workerspublic void setConf(ImmutableClassesGiraphConfiguration conf)
GiraphConfigurationSettable
setConf
in interface GiraphConfigurationSettable<org.apache.hadoop.io.LongWritable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
setConf
in class DefaultImmutableClassesGiraphConfigurable<org.apache.hadoop.io.LongWritable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
conf
- Set configurationCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.