Class LoggingStateRestoreListener

  • All Implemented Interfaces:
    StateRestoreService, org.apache.kafka.streams.processor.StateRestoreListener

    public class LoggingStateRestoreListener
    extends Object
    implements org.apache.kafka.streams.processor.StateRestoreListener, StateRestoreService
    A StateRestoreListener implementation which logs state restoration progress.
    • Constructor Detail

      • LoggingStateRestoreListener

        public LoggingStateRestoreListener()
    • Method Detail

      • onRestoreStart

        public void onRestoreStart​(org.apache.kafka.common.TopicPartition topicPartition,
                                   String storeName,
                                   long startingOffset,
                                   long endingOffset)
        Specified by:
        onRestoreStart in interface org.apache.kafka.streams.processor.StateRestoreListener
      • onBatchRestored

        public void onBatchRestored​(org.apache.kafka.common.TopicPartition topicPartition,
                                    String storeName,
                                    long batchEndOffset,
                                    long numRestored)
        Specified by:
        onBatchRestored in interface org.apache.kafka.streams.processor.StateRestoreListener
      • calculateRemainingFormatted

        public String calculateRemainingFormatted​(org.apache.kafka.common.TopicPartition topicPartition,
                                                  long batchEndOffset)
      • onRestoreEnd

        public void onRestoreEnd​(org.apache.kafka.common.TopicPartition topicPartition,
                                 String storeName,
                                 long totalRestored)
        Specified by:
        onRestoreEnd in interface org.apache.kafka.streams.processor.StateRestoreListener