Class 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
      void init​(org.apache.hugegraph.computer.core.config.Config config)
      Initialize the partitioner with config.
      int partitionId​(org.apache.hugegraph.computer.core.graph.id.Id vertexId)
      Get the partition id by specified vertex id.
      int workerId​(int partitionId)
      Get the worker id by specified partition id.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HashPartitioner

        public HashPartitioner()
    • Method Detail

      • init

        public void init​(org.apache.hugegraph.computer.core.config.Config config)
        Description copied from interface: Partitioner
        Initialize the partitioner with config.
        Specified by:
        init in interface Partitioner
      • partitionId

        public int partitionId​(org.apache.hugegraph.computer.core.graph.id.Id vertexId)
        Description copied from interface: Partitioner
        Get the partition id by specified vertex id.
        Specified by:
        partitionId in interface Partitioner
      • workerId

        public int workerId​(int partitionId)
        Description copied from interface: Partitioner
        Get the worker id by specified partition id.
        Specified by:
        workerId in interface Partitioner