GitHub user guozhangwang opened a pull request: https://github.com/apache/kafka/pull/2338
MINOR: remove unnecessary store info from TopologyBuilder This PR is extracted from https://github.com/apache/kafka/pull/2333 as an incremental fix to ease the reviewing: 1. Removed `storeToProcessorNodeMap` from ProcessorTopology since it was previously used to set the context current record, and can now be replaced with the dirty entry in the named cache. 2. Replaced `sourceStoreToSourceTopic` from ProcessorTopology with `storeToChangelogTopic` map, which includes the corresponding changelog topic name for all stores that are changelog enabled. 3. Modified `ProcessorStateManager` to rely on `sourceStoreToSourceTopic` when retrieving the changelog topic; this makes the second parameter `loggingEnabled` in `register` not needed any more, and we can deprecate the old API with a new one. 4. Also fixed a minor issue in `KStreamBuilder`: if the storeName is not provided in the `table(..)` function, do not create the underlying materialized store. Modified the unit tests to cover this case. 5. Fixed a bunch of other unit tests failures that are exposed by this refactoring, in which we are not setting the applicationId correctly when constructing the mocking processor topology. You can merge this pull request into a Git repository by running: $ git pull https://github.com/guozhangwang/kafka KMinor-refactor-state-to-changelogtopic Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/2338.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 #2338 ---- commit 2073cd23029f804ec91b19ae7a2919c2b8102244 Author: Guozhang Wang <wangg...@gmail.com> Date: 2017-01-10T05:31:41Z refactor topology builder commit 675caca2121f47f846c067365a106d2eb0861a6e Author: Guozhang Wang <wangg...@gmail.com> Date: 2017-01-10T06:18:08Z fix unit tests ---- --- 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. ---