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
AStateRestoreListener
implementation which logs state restoration progress.
-
-
Constructor Summary
Constructors Constructor Description LoggingStateRestoreListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
calculateRemainingFormatted(org.apache.kafka.common.TopicPartition topicPartition, long batchEndOffset)
StateRestoreInfo
getStateRestoreInfo(String state)
Gets the state state of a the restoration process for given state store.void
onBatchRestored(org.apache.kafka.common.TopicPartition topicPartition, String storeName, long batchEndOffset, long numRestored)
void
onRestoreEnd(org.apache.kafka.common.TopicPartition topicPartition, String storeName, long totalRestored)
void
onRestoreStart(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:
onRestoreStart
in interfaceorg.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 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:
onRestoreEnd
in 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:
getStateRestoreInfo
in interfaceStateRestoreService
- Parameters:
state
- the name of the state.- Returns:
- the
StateRestoreInfo
.
-
-