类 FunctionAssignmentTailer

  • 所有已实现的接口:
    java.lang.AutoCloseable

    public class FunctionAssignmentTailer
    extends java.lang.Object
    implements java.lang.AutoCloseable
    This class is responsible for reading assignments from the 'assignments' functions internal topic. Only functions worker leader writes to the topic while other workers read from the topic. When a worker become a leader, the worker will read to the end of the assignments topic and close its reader to the topic. Then the worker and new leader will be in charge of computing new assignments when necessary. The leader does not need to listen to the assignments topic because it can just update its in memory assignments map directly after it computes a new scheduling. When a worker loses leadership, the worker is start reading from the assignments topic again.
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void close()  
      void start()  
      void startFromMessage​(org.apache.pulsar.client.api.MessageId startMessageId)  
      java.util.concurrent.CompletableFuture<java.lang.Void> triggerReadToTheEndAndExit()  
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • FunctionAssignmentTailer

        public FunctionAssignmentTailer​(FunctionRuntimeManager functionRuntimeManager,
                                        org.apache.pulsar.client.api.ReaderBuilder readerBuilder,
                                        org.apache.pulsar.functions.worker.WorkerConfig workerConfig,
                                        ErrorNotifier errorNotifier)
    • 方法详细资料

      • triggerReadToTheEndAndExit

        public java.util.concurrent.CompletableFuture<java.lang.Void> triggerReadToTheEndAndExit()
      • startFromMessage

        public void startFromMessage​(org.apache.pulsar.client.api.MessageId startMessageId)
                              throws org.apache.pulsar.client.api.PulsarClientException
        抛出:
        org.apache.pulsar.client.api.PulsarClientException
      • start

        public void start()
                   throws org.apache.pulsar.client.api.PulsarClientException
        抛出:
        org.apache.pulsar.client.api.PulsarClientException
      • close

        public void close()
        指定者:
        close 在接口中 java.lang.AutoCloseable