...
Table of Contents |
---|
Current state: Under Discussion Accepted [VOTE]: 167 Add interface for the state store restoration process
Discussion thread: here
JIRA:
Jira | ||||||
---|---|---|---|---|---|---|
|
...
Code Block |
---|
public interface StateRestoreListener { void onRestoreStart(TopicPartition topicPartition, StateStore storeName, long startingOffset, long endOffset); void onBatchRestored(TopicPartition topicPartition, String storeName, long batchEndOffset, long numRestored); void onRestoreEnd(TopicPartition topicPartition, String storeName, long totalRestored); } |
...
Code Block |
---|
public abstract class AbstractNotifyingRestoreCallback implements StateRestoreCallback, StateRestoreListener { @Override public void onRestoreStart(TopicPartition topicPartition, String storeName, long startingOffset, long endingOffset) { } @Override public void onBatchRestored(TopicPartition topicPartition, String storeName, long batchEndOffset, long numRestored) { } @Override public void onRestoreEnd(TopicPartition topicPartition, String storeName, long totalRestored) { } } |
...
Code Block |
---|
public abstract class AbstractBatchingRestoreCallback implements BatchingStateRestoreCallback, StateRestoreListener { @Override public void restore(byte[] key, byte[] value) { throw new UnsupportedOperationException("Single restore not supported"); } @Override public void onRestoreStart(TopicPartition topicPartition, String storeName, long startingOffset, long endingOffset) { } @Override public void onBatchRestored(TopicPartition topicPartition, String storeName, long batchEndOffset, long numRestored) { } @Override public void onRestoreEnd(TopicPartition topicPartition, String storeName, long totalRestored) { } } |
...