kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject [kafka] branch trunk updated: KAFKA-6894: Improve err msg when connecting processor with global store (#5000)
Date Thu, 10 May 2018 22:49:43 GMT
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 <rayokota@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 <matthias@confluent.io>, Guozhang Wang <wangguoz@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.

Mime
View raw message