Hi everyone :slightly_smiling_face: I’m using flin...
# troubleshooting
l
Hi everyone 🙂 I’m using flink 1.14.3, and I want to have the ability to know what’s saved in the state. therefor I thought of using State Processor API, but I’m not able to get it to work.. I tried to do something similar to this example and I’m getting an error : Caused by: java.lang.IllegalStateException: Unexpected key-group in restore
Copy code
... 8 more
Caused by: java.lang.IllegalStateException: Unexpected key-group in restore.
	at org.apache.flink.util.Preconditions.checkState(Preconditions.java:193) ~[flink-dist_2.12-1.14.3.jar:1.14.3]
	at org.apache.flink.runtime.state.heap.HeapRestoreOperation.readStateHandleStateData(HeapRestoreOperation.java:214) ~[flink-dist_2.12-1.14.3.jar:1.14.3]
	at org.apache.flink.runtime.state.heap.HeapRestoreOperation.restore(HeapRestoreOperation.java:166) ~[flink-dist_2.12-1.14.3.jar:1.14.3]
	at org.apache.flink.runtime.state.heap.HeapRestoreOperation.restore(HeapRestoreOperation.java:62) ~[flink-dist_2.12-1.14.3.jar:1.14.3]
	at org.apache.flink.runtime.state.heap.HeapKeyedStateBackendBuilder.restoreState(HeapKeyedStateBackendBuilder.java:174) ~[flink-dist_2.12-1.14.3.jar:1.14.3]
	at org.apache.flink.runtime.state.heap.HeapKeyedStateBackendBuilder.build(HeapKeyedStateBackendBuilder.java:111) ~[flink-dist_2.12-1.14.3.jar:1.14.3]
	at org.apache.flink.runtime.state.hashmap.HashMapStateBackend.createKeyedStateBackend(HashMapStateBackend.java:131) ~[flink-dist_2.12-1.14.3.jar:1.14.3]
	at org.apache.flink.runtime.state.hashmap.HashMapStateBackend.createKeyedStateBackend(HashMapStateBackend.java:73) ~[flink-dist_2.12-1.14.3.jar:1.14.3]
	at org.apache.flink.runtime.state.StateBackend.createKeyedStateBackend(StateBackend.java:136) ~[flink-dist_2.12-1.14.3.jar:1.14.3]
	at org.apache.flink.streaming.api.operators.StreamTaskStateInitializerImpl.lambda$keyedStatedBackend$1(StreamTaskStateInitializerImpl.java:329) ~[flink-dist_2.12-1.14.3.jar:1.14.3]
	at org.apache.flink.streaming.api.operators.BackendRestorerProcedure.attemptCreateAndRestore(BackendRestorerProcedure.java:168) ~[flink-dist_2.12-1.14.3.jar:1.14.3]
	at org.apache.flink.streaming.api.operators.BackendRestorerProcedure.createAndRestore(BackendRestorerProcedure.java:135) ~[flink-dist_2.12-1.14.3.jar:1.14.3]
	at org.apache.flink.streaming.api.operators.StreamTaskStateInitializerImpl.keyedStatedBackend(StreamTaskStateInitializerImpl.java:346) ~[flink-dist_2.12-1.14.3.jar:1.14.3]
	at org.apache.flink.streaming.api.operators.StreamTaskStateInitializerImpl.streamOperatorStateContext(StreamTaskStateInitializerImpl.java:164) ~[flink-dist_2.12-1.14.3.jar:1.14.3]
	at org.apache.flink.state.api.input.KeyedStateInputFormat.getStreamOperatorStateContext(KeyedStateInputFormat.java:187) ~[?:?]
	... 8 more
does someone know what can cause it? or maybe an idea of how to read the state for debug purposes in flink 1.14? (I know there is queryable state in more advanced versions, but saw that it’s already deprecated) thanks 🙏
y
Hi @linor harnik, could it be that you are using a different state store then the one you are using in production to load the snapshot?
l
we are using RocksDB in production, is that what you mean? I did use a different state store if that’s the meaning, I used HashMapStateBackend, but that’s after I tried locally to use EmbeddedRocksDBStateBackend and still had some errors.. but I did changed a few things since then and running now on a job at the same env, so I’ll try and keep you updated. Thanks 🙂
👍 1
y
When you’re restoring with the State Processor API you must use the same state backend you use to generate it
l
it worked 🙂
🎊 2