Improve error message if state store is not found
Reviewers: Bill Bejeck Matthias J. Sax
@@ -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);
