I am trying to use queryable state, and am encountering issues when querying 
the state from the client. I get the following exception:

Exception in thread "main" 
org.apache.flink.runtime.query.UnknownKvStateLocation: No KvStateLocation found 
for KvState instance with name 'word_sums'.
        at 
org.apache.flink.runtime.jobmanager.JobManager.org$apache$flink$runtime$jobmanager$JobManager$$handleKvStateMessage(JobManager.scala:1532)
        at 
org.apache.flink.runtime.jobmanager.JobManager$$anonfun$handleMessage$1.applyOrElse(JobManager.scala:777)
        at 
scala.runtime.AbstractPartialFunction$mcVL$sp.apply$mcVL$sp(AbstractPartialFunction.scala:33)
        at 
scala.runtime.AbstractPartialFunction$mcVL$sp.apply(AbstractPartialFunction.scala:33)
 Exception in thread "main" 
org.apache.flink.runtime.query.UnknownKvStateLocation: No KvStateLocation found 
for KvState instance with name 'word_sums'.
        at 
org.apache.flink.runtime.jobmanager.JobManager.org$apache$flink$runtime$jobmanager$JobManager$$handleKvStateMessage(JobManager.scala:1532)
        at 
org.apache.flink.runtime.jobmanager.JobManager$$anonfun$handleMessage$1.applyOrElse(JobManager.scala:777)
        at 
scala.runtime.AbstractPartialFunction$mcVL$sp.apply$mcVL$sp(AbstractPartialFunction.scala:33)
        at 
scala.runtime.AbstractPartialFunction$mcVL$sp.apply(AbstractPartialFunction.scala:33)

In my flow, I am creating the queryable state in the following way:

final TypeSerializer<Tuple2<String, Integer>> valueSerializer =
        TypeInformation.of(new TypeHint<Tuple2<String, Integer>>() 
{}).createSerializer(new ExecutionConfig());
ValueStateDescriptor<Tuple2<String,Integer>> vsd = new 
ValueStateDescriptor<>(WORD_SUMS_STATE,valueSerializer);
QueryableStateStream<Tuple, Tuple2<String, Integer>> 
tupleTuple2QueryableStateStream = 
wordsSummedStream.asQueryableState(WORD_SUMS_STATE, vsd);

I am using LocalFlinkMiniCluster and have enabled 
QueryableStateOptions.SERVER_ENABLE in the configuration. From the logs in the 
startup of the flow, I see that the queryable state operator is running. I also 
see the queryable state operation from the web console 

Is there anything else that I am missing?

Thanks,
Hayden Marchant


Reply via email to