You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by gu...@apache.org on 2018/05/10 22:49:43 UTC

[kafka] branch trunk updated: KAFKA-6894: Improve err msg when connecting processor with global store (#5000)

This is an automated email from the ASF dual-hosted git repository.

guozhang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new f69900c  KAFKA-6894: Improve err msg when connecting processor with global store (#5000)
f69900c is described below

commit f69900cd1e6b17196e88321062e865d6585c6423
Author: Robert Yokota <ra...@gmail.com>
AuthorDate: Thu May 10 15:49:39 2018 -0700

    KAFKA-6894: Improve err msg when connecting processor with global store (#5000)
    
    Reviewers: Matthias J. Sax <ma...@confluent.io>, Guozhang Wang <wa...@gmail.com>
---
 .../kafka/streams/processor/internals/InternalTopologyBuilder.java    | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopologyBuilder.java b/streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopologyBuilder.java
index b1d60a9..bfe8cda 100644
--- a/streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopologyBuilder.java
+++ b/streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopologyBuilder.java
@@ -712,6 +712,10 @@ public class InternalTopologyBuilder {
 
     private void connectProcessorAndStateStore(final String processorName,
                                                final String stateStoreName) {
+        if (globalStateStores.containsKey(stateStoreName)) {
+            throw new TopologyException("Global StateStore " + stateStoreName +
+                    " can be used by a Processor without being specified; it should not be explicitly passed.");
+        }
         if (!stateFactories.containsKey(stateStoreName)) {
             throw new TopologyException("StateStore " + stateStoreName + " is not added yet.");
         }

-- 
To stop receiving notification emails like this one, please contact
guozhang@apache.org.