Class MasterAggrManager

  • All Implemented Interfaces:
    Manager

    public class MasterAggrManager
    extends java.lang.Object
    implements Manager
    Aggregator manager manages aggregators in master.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String NAME  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <V extends org.apache.hugegraph.computer.core.graph.value.Value>
      void
      aggregatedAggregator​(java.lang.String name, V value)  
      <V extends org.apache.hugegraph.computer.core.graph.value.Value>
      V
      aggregatedValue​(java.lang.String name)  
      void beforeSuperstep​(org.apache.hugegraph.computer.core.config.Config config, int superstep)
      Do some initialization for a superstep.
      void close​(org.apache.hugegraph.computer.core.config.Config config)
      Close the resources used in the computation.
      AggregateRpcService handler()  
      void inited​(org.apache.hugegraph.computer.core.config.Config config)
      Used to notify all managers that master or worker is inited.
      java.lang.String name()
      The unique identify name.
      <V extends org.apache.hugegraph.computer.core.graph.value.Value>
      void
      registerAggregator​(java.lang.String name, org.apache.hugegraph.computer.core.aggregator.Aggregator<V> aggr)  
      • Methods inherited from class java.lang.Object

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

      • MasterAggrManager

        public MasterAggrManager()
    • Method Detail

      • name

        public java.lang.String name()
        Description copied from interface: Manager
        The unique identify name.
        Specified by:
        name in interface Manager
      • inited

        public void inited​(org.apache.hugegraph.computer.core.config.Config config)
        Description copied from interface: Manager
        Used to notify all managers that master or worker is inited. Be called only one time before all supersteps start.
        Specified by:
        inited in interface Manager
      • close

        public void close​(org.apache.hugegraph.computer.core.config.Config config)
        Description copied from interface: Manager
        Close the resources used in the computation. Be called only one time after all supersteps ended.
        Specified by:
        close in interface Manager
      • beforeSuperstep

        public void beforeSuperstep​(org.apache.hugegraph.computer.core.config.Config config,
                                    int superstep)
        Description copied from interface: Manager
        Do some initialization for a superstep. Be called before a superstep. Subclass should override this method if wants to do something before a superstep.
        Specified by:
        beforeSuperstep in interface Manager
      • registerAggregator

        public <V extends org.apache.hugegraph.computer.core.graph.value.Value> void registerAggregator​(java.lang.String name,
                                                                                                        org.apache.hugegraph.computer.core.aggregator.Aggregator<V> aggr)
      • aggregatedAggregator

        public <V extends org.apache.hugegraph.computer.core.graph.value.Value> void aggregatedAggregator​(java.lang.String name,
                                                                                                          V value)
      • aggregatedValue

        public <V extends org.apache.hugegraph.computer.core.graph.value.Value> V aggregatedValue​(java.lang.String name)