[ 
https://issues.apache.org/jira/browse/KAFKA-4322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15687516#comment-15687516
 ] 

Mark Shelton commented on KAFKA-4322:
-------------------------------------

The logging is the same for us and logging framework is not the concern.

We know some domain-specific information about the keys and would like to, at 
the end of state restore, for example report how many keys of a given type were 
added and deleted. Having the begin and end callback makes this much easier as 
the begin callback can allocate the structure for statistics and the end 
callback can log the breakdown of keys added/removed per type, subtype etc.. My 
app has domain specific knowledge of keys that streams won't have.


> StateRestoreCallback begin and end indication
> ---------------------------------------------
>
>                 Key: KAFKA-4322
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4322
>             Project: Kafka
>          Issue Type: Improvement
>          Components: streams
>    Affects Versions: 0.10.1.0
>            Reporter: Mark Shelton
>            Assignee: Mark Shelton
>            Priority: Minor
>
> In Kafka Streams, the StateRestoreCallback interface provides only a single 
> method "restore(byte[] key, byte[] value)" that is called for every key-value 
> pair to be restored. 
> It would be nice to have "beginRestore" and "endRestore" methods as part of 
> StateRestoreCallback.
> Kafka Streams would call "beginRestore" before restoring any keys, and would 
> call "endRestore" when it determines that it is done. This allows an 
> implementation, for example, to report on the number of keys restored and 
> perform a commit after the last key was restored. Other uses are conceivable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to