Class StandbyTask

  • All Implemented Interfaces:
    Task

    public class StandbyTask
    extends AbstractTask
    A StandbyTask
    • Method Detail

      • initializeStateStores

        public boolean initializeStateStores()
        Description copied from interface: Task
        Initialize the task and return true if the task is ready to run, i.e, it has not state stores
        Returns:
        true if this task has no state stores that may need restoring.
      • initializeTopology

        public void initializeTopology()
      • resume

        public void resume()
         - update offset limits
         
      • commit

        public void commit()
         - flush store
         - checkpoint store
         - update offset limits
         
      • suspend

        public void suspend()
         - flush store
         - checkpoint store
         
      • close

        public void close​(boolean clean,
                          boolean isZombie)
         - commit()
         - close state
         
        Parameters:
        clean - ignored by StandbyTask as it can always try to close cleanly (ie, commit, flush, and write checkpoint file)
        isZombie - ignored by StandbyTask as it can never be a zombie
      • closeSuspended

        public void closeSuspended​(boolean clean,
                                   boolean isZombie,
                                   java.lang.RuntimeException e)
      • update

        public java.util.List<org.apache.kafka.clients.consumer.ConsumerRecord<byte[],​byte[]>> update​(org.apache.kafka.common.TopicPartition partition,
                                                                                                            java.util.List<org.apache.kafka.clients.consumer.ConsumerRecord<byte[],​byte[]>> records)
        Updates a state store using records from one change log partition
        Returns:
        a list of records not consumed