kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mj...@apache.org
Subject [kafka] branch trunk updated: KAFKA-6659: Improve error message if state store is not found (#4732)
Date Thu, 22 Mar 2018 22:37:33 GMT
This is an automated email from the ASF dual-hosted git repository.

mjsax 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 9ee00c4  KAFKA-6659: Improve error message if state store is not found (#4732)
9ee00c4 is described below

commit 9ee00c4b6661a590afcd5fb390bd0abaa3dcce1b
Author: Stuart Perks <stuart.m.perks@gmail.com>
AuthorDate: Thu Mar 22 22:37:28 2018 +0000

    KAFKA-6659: Improve error message if state store is not found (#4732)
    
    Reviewers: Bill Bejeck <bill@confluent.io>, Matthias J. Sax <matthias@confluent.io>
---
 .../kafka/streams/processor/internals/ProcessorContextImpl.java   | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/streams/src/main/java/org/apache/kafka/streams/processor/internals/ProcessorContextImpl.java
b/streams/src/main/java/org/apache/kafka/streams/processor/internals/ProcessorContextImpl.java
index 3761bfb..44a25c1 100644
--- a/streams/src/main/java/org/apache/kafka/streams/processor/internals/ProcessorContextImpl.java
+++ b/streams/src/main/java/org/apache/kafka/streams/processor/internals/ProcessorContextImpl.java
@@ -72,7 +72,13 @@ public class ProcessorContextImpl extends AbstractProcessorContext implements
Re
         }
 
         if (!currentNode().stateStores.contains(name)) {
-            throw new StreamsException("Processor " + currentNode().name() + " has no access
to StateStore " + name);
+            throw new StreamsException("Processor " + currentNode().name() + " has no access
to StateStore " + name +
+                    " as the store is not connected to the processor. If you add stores manually
via '.addStateStore()' " +
+                    "make sure to connect the added store to the processor by providing the
processor name to " +
+                    "'.addStateStore()' or connect them via '.connectProcessorAndStateStores()'.
" +
+                    "DSL users need to provide the store name to '.process()', '.transform()',
or '.transformValues()' " +
+                    "to connect the store to the corresponding operator. If you do not add
stores manually, " +
+                    "please file a bug report at https://issues.apache.org/jira/projects/KAFKA.");
         }
 
         return stateManager.getStore(name);

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

Mime
View raw message