I'm getting the following exception when I attempt...
# troubleshooting
r
I'm getting the following exception when I attempt to run my stateful flink app with more than 1 task manager, and I'm not sure why.
Copy code
Caused by: java.lang.IllegalArgumentException: Key group 75 is not in KeyGroupRange{startKeyGroup=0, endKeyGroup=63}. Unless you're directly using low level state access APIs, this is most likely caused by non-deterministic shuffle key (hashCode and equals implementation).
The only
KeySelector
I'm using is returning the following, which is definitely deterministic. The
AggregationType
is a valueless
enum
Copy code
data class MetricKey(
    val name: String,
    val aggregationType: AggregationType,
    val timestamp: Long,
)
The event stream is being fed into my
KeyedProcessFunction
Copy code
class AggregationProcessor : KeyedProcessFunction<MetricKey, Metric, AggregationResult>()
This class does hold several
AggregatingStateDescriptors
which relies on the key so that aggregations are performed with the data grouped by the key. Any idea what to look for?
To close the loop, it was the
AggregationType
`Enum`causing weird behavior when serializing / hashcodes. I instead just stored the ordinal and now its fine