Tsering
04/09/2023, 12:55 PMjava.lang.IllegalArgumentException: key group from 0 to 6 does not contain 120
at org.apache.flink.util.Preconditions.checkArgument(Preconditions.java:160)
at org.apache.flink.runtime.state.heap.KeyGroupPartitionedPriorityQueue.globalKeyGroupToLocalIndex(KeyGroupPartitionedPriorityQueue.java:191)
at org.apache.flink.runtime.state.heap.KeyGroupPartitionedPriorityQueue.computeKeyGroupIndex(KeyGroupPartitionedPriorityQueue.java:186)
at org.apache.flink.runtime.state.heap.KeyGroupPartitionedPriorityQueue.getKeyGroupSubHeapForElement(KeyGroupPartitionedPriorityQueue.java:179)
at org.apache.flink.runtime.state.heap.KeyGroupPartitionedPriorityQueue.add(KeyGroupPartitionedPriorityQueue.java:114)
at org.apache.flink.streaming.api.operators.InternalTimerServiceImpl.registerEventTimeTimer(InternalTimerServiceImpl.java:233)
at org.apache.flink.streaming.runtime.operators.windowing.WindowOperator$Context.registerEventTimeTimer(WindowOperator.java:922)
please let me know if you have any idea whatβs going on here? I have been stuck here for a few days but literally found no clue.Hong Teoh
04/09/2023, 12:56 PMkeyBy
? Is it deterministic or random?Tsering
04/09/2023, 12:56 PM.keyBy(new KeySelector<Tuple3<String, RateRule, Long>, Tuple2<String, RateRule>>() {
@Override
public Tuple2<String, RateRule> getKey(Tuple3<String, RateRule, Long> value) throws Exception {
return new Tuple2<>(value.f0, value.f1);
}
})
Hong Teoh
04/09/2023, 12:58 PMRateRule
calculated?Tsering
04/09/2023, 12:58 PM@Override
public int hashCode() {
int result = blockKind != null ? blockKind.hashCode() : 0;
result = 31 * result + (county != null ? county.hashCode() : 0);
result = 31 * result + (trueClientIp != null ? trueClientIp.hashCode() : 0);
result = 31 * result + (upmid != null ? upmid.hashCode() : 0);
result = 31 * result + (limit != null ? limit.hashCode() : 0);
result = 31 * result + (windowSize != null ? windowSize.hashCode() : 0);
result = 31 * result + (startTime != null ? startTime.hashCode() : 0);
result = 31 * result + (expiration != null ? expiration.hashCode() : 0);
result = 31 * result + (ruleState != null ? ruleState.hashCode() : 0);
return result;
}
Hong Teoh
04/09/2023, 1:00 PMDanny Cranmer
04/09/2023, 2:39 PMTsering
04/09/2023, 2:39 PM