Class SortManager

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.slf4j.Logger LOG  
    • Constructor Summary

      Constructors 
      Constructor Description
      SortManager​(org.apache.hugegraph.computer.core.common.ComputerContext context)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void close​(org.apache.hugegraph.computer.core.config.Config config)
      Close the resources used in the computation.
      void init​(org.apache.hugegraph.computer.core.config.Config config)
      Used to add the resources needed by the computation.
      PeekableIterator<KvEntry> iterator​(java.util.List<java.lang.String> outputs, boolean withSubKv)  
      java.util.concurrent.CompletableFuture<java.lang.Void> mergeBuffers​(java.util.List<org.apache.hugegraph.computer.core.io.RandomAccessInput> inputs, java.lang.String path, boolean withSubKv, OuterSortFlusher flusher)  
      void mergeInputs​(java.util.List<java.lang.String> inputs, java.util.List<java.lang.String> outputs, boolean withSubKv, OuterSortFlusher flusher)  
      abstract java.lang.String name()
      The unique identify name.
      java.util.concurrent.CompletableFuture<java.nio.ByteBuffer> sort​(MessageType type, WriteBuffers buffer)  
      protected java.lang.Integer threadNum​(org.apache.hugegraph.computer.core.config.Config config)  
      protected abstract java.lang.String threadPrefix()  
      • Methods inherited from class java.lang.Object

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

      • LOG

        public static final org.slf4j.Logger LOG
    • Constructor Detail

      • SortManager

        public SortManager​(org.apache.hugegraph.computer.core.common.ComputerContext context)
    • Method Detail

      • name

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

        protected abstract java.lang.String threadPrefix()
      • threadNum

        protected java.lang.Integer threadNum​(org.apache.hugegraph.computer.core.config.Config config)
      • init

        public void init​(org.apache.hugegraph.computer.core.config.Config config)
        Description copied from interface: Manager
        Used to add the resources needed by the computation. Be called only one time before all supersteps start.
        Specified by:
        init 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
      • sort

        public java.util.concurrent.CompletableFuture<java.nio.ByteBuffer> sort​(MessageType type,
                                                                                WriteBuffers buffer)
      • mergeBuffers

        public java.util.concurrent.CompletableFuture<java.lang.Void> mergeBuffers​(java.util.List<org.apache.hugegraph.computer.core.io.RandomAccessInput> inputs,
                                                                                   java.lang.String path,
                                                                                   boolean withSubKv,
                                                                                   OuterSortFlusher flusher)
      • mergeInputs

        public void mergeInputs​(java.util.List<java.lang.String> inputs,
                                java.util.List<java.lang.String> outputs,
                                boolean withSubKv,
                                OuterSortFlusher flusher)
      • iterator

        public PeekableIterator<KvEntry> iterator​(java.util.List<java.lang.String> outputs,
                                                  boolean withSubKv)