GitHub user dguy opened a pull request:

    https://github.com/apache/kafka/pull/1918

    [WIP] allow Processors to write to State Stores during Processor.init()

    If a Processor writes to a State Store in the init and 0 records are 
processed before `commit` is called an IllegalStateException is thrown. This is 
because the `RecordContext` has not been set on `ProcessorContext` and 
`RecordCollector` calls `context.timestamp()` when it is flushing the records 
to the changelog.
    This sets a dummy `RecordContext` with the timestamp set to 
`System.currentTimeMillis` prior to Processor init.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dguy/kafka processor-init

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/1918.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1918
    
----
commit 9e5c583a9bdbac66644ce9dd050109e0d9d2f21d
Author: Damian Guy <damian....@gmail.com>
Date:   2016-09-27T14:09:49Z

    allow Processors to write to State Stores during Processor.init()

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to