Class HashPartitioner
- java.lang.Object
-
- org.apache.hugegraph.computer.core.graph.partition.HashPartitioner
-
- All Implemented Interfaces:
Partitioner
public final class HashPartitioner extends java.lang.Object implements Partitioner
-
-
Constructor Summary
Constructors Constructor Description HashPartitioner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit(org.apache.hugegraph.computer.core.config.Config config)Initialize the partitioner with config.intpartitionId(org.apache.hugegraph.computer.core.graph.id.Id vertexId)Get the partition id by specified vertex id.intworkerId(int partitionId)Get the worker id by specified partition id.
-
-
-
Method Detail
-
init
public void init(org.apache.hugegraph.computer.core.config.Config config)
Description copied from interface:PartitionerInitialize the partitioner with config.- Specified by:
initin interfacePartitioner
-
partitionId
public int partitionId(org.apache.hugegraph.computer.core.graph.id.Id vertexId)
Description copied from interface:PartitionerGet the partition id by specified vertex id.- Specified by:
partitionIdin interfacePartitioner
-
workerId
public int workerId(int partitionId)
Description copied from interface:PartitionerGet the worker id by specified partition id.- Specified by:
workerIdin interfacePartitioner
-
-