Class LoggingStateRestoreListener
- java.lang.Object
-
- io.streamthoughts.azkarra.commons.streams.LoggingStateRestoreListener
-
- All Implemented Interfaces:
StateRestoreService,org.apache.kafka.streams.processor.StateRestoreListener
public class LoggingStateRestoreListener extends Object implements org.apache.kafka.streams.processor.StateRestoreListener, StateRestoreService
AStateRestoreListenerimplementation which logs state restoration progress.
-
-
Constructor Summary
Constructors Constructor Description LoggingStateRestoreListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcalculateRemainingFormatted(org.apache.kafka.common.TopicPartition topicPartition, long batchEndOffset)StateRestoreInfogetStateRestoreInfo(String state)Gets the state state of a the restoration process for given state store.voidonBatchRestored(org.apache.kafka.common.TopicPartition topicPartition, String storeName, long batchEndOffset, long numRestored)voidonRestoreEnd(org.apache.kafka.common.TopicPartition topicPartition, String storeName, long totalRestored)voidonRestoreStart(org.apache.kafka.common.TopicPartition topicPartition, String storeName, long startingOffset, long endingOffset)
-
-
-
Method Detail
-
onRestoreStart
public void onRestoreStart(org.apache.kafka.common.TopicPartition topicPartition, String storeName, long startingOffset, long endingOffset)- Specified by:
onRestoreStartin interfaceorg.apache.kafka.streams.processor.StateRestoreListener
-
onBatchRestored
public void onBatchRestored(org.apache.kafka.common.TopicPartition topicPartition, String storeName, long batchEndOffset, long numRestored)- Specified by:
onBatchRestoredin interfaceorg.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:
onRestoreEndin interfaceorg.apache.kafka.streams.processor.StateRestoreListener
-
getStateRestoreInfo
public StateRestoreInfo getStateRestoreInfo(String state)
Gets the state state of a the restoration process for given state store.- Specified by:
getStateRestoreInfoin interfaceStateRestoreService- Parameters:
state- the name of the state.- Returns:
- the
StateRestoreInfo.
-
-