You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by mj...@apache.org on 2018/03/22 22:37:33 UTC

[kafka] branch trunk updated: KAFKA-6659: Improve error message if state store is not found (#4732)

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 <st...@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 <bi...@confluent.io>, Matthias J. Sax <ma...@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.