KAFKA-6659: Improve error message if state store is not found (#4732)

Reviewers: Bill Bejeck <bill@confluent.io>, Matthias J. Sax <matthias@confluent.io>
This commit is contained in:
Stuart Perks 2018-03-22 22:37:28 +00:00 committed by Matthias J. Sax
parent 57b1c28d60
commit 9ee00c4b66
1 changed files with 7 additions and 1 deletions

View File

@ -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);