1
votes

I'm using Keyed process function to use RocksDB state backend. I want to hold two different states for the same key;

  • State 1 type: ValueState[String]
  • State 2 type: MapState[String, Long]

In this case, i have to create two state descriptors in the same keyed process function. Is that possible in flink?

1

1 Answers

0
votes

Yes, you can have as many state descriptors in a keyed process function as you want. Each must have a unique name (scoped to the operator/function).

See the solution to the Rides and Fares training exercise for an example.