{"record":{"id":"3c4a741f74052ac9","repo":"apache/iceberg","slug":"invalid-operator-event-type-3c4a74","errorCode":null,"errorMessage":"Invalid operator event type: ","messagePattern":"Invalid operator event type: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/sink/shuffle/DataStatisticsCoordinator.java","lineNumber":322,"sourceCode":"    }\n  }\n\n  @Override\n  public void handleEventFromOperator(int subtask, int attemptNumber, OperatorEvent event) {\n    runInCoordinatorThread(\n        () -> {\n          LOG.debug(\n              \"Handling event from subtask {} (#{}) of {}: {}\",\n              subtask,\n              attemptNumber,\n              operatorName,\n              event);\n          if (event instanceof StatisticsEvent) {\n            handleDataStatisticRequest(subtask, ((StatisticsEvent) event));\n          } else if (event instanceof RequestGlobalStatisticsEvent) {\n            handleRequestGlobalStatisticsEvent(subtask, (RequestGlobalStatisticsEvent) event);\n          } else {\n            throw new IllegalArgumentException(\n                \"Invalid operator event type: \" + event.getClass().getCanonicalName());\n          }\n        },\n        String.format(\n            Locale.ROOT,\n            \"handling operator event %s from subtask %d (#%d)\",\n            event.getClass(),\n            subtask,\n            attemptNumber));\n  }\n\n  @Override\n  public void checkpointCoordinator(long checkpointId, CompletableFuture<byte[]> resultFuture) {\n    runInCoordinatorThread(\n        () -> {\n          LOG.debug(\n              \"Snapshotting data statistics coordinator {} for checkpoint {}\",\n              operatorName,","sourceCodeStart":304,"sourceCodeEnd":340,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/sink/shuffle/DataStatisticsCoordinator.java#L304-L340","documentation":"DataStatisticsCoordinator.handleEventFromOperator dispatches operator events from subtasks; only StatisticsEvent and RequestGlobalStatisticsEvent are recognized. Any other OperatorEvent type is rejected with IllegalArgumentException naming the event's canonical class name.","triggerScenarios":"An OperatorEvent arriving at the coordinator that is neither StatisticsEvent nor RequestGlobalStatisticsEvent — e.g. mismatched jar versions where a subtask sends an event class the coordinator doesn't know, or a custom event wired into this coordinator.","commonSituations":"Mixed iceberg-flink jar versions between JobManager/TaskManager during rolling upgrades; custom operator event subclasses routed to the wrong coordinator.","solutions":["Ensure all TaskManagers and the JobManager run the same iceberg-flink version so only known event types are sent.","Check custom code for OperatorEvents being sent to DataStatisticsCoordinator that it does not handle.","Restart the cluster fully (not rolling) after an upgrade to eliminate mixed-version events."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (!(event instanceof StatisticsEvent) && !(event instanceof RequestGlobalStatisticsEvent)) { throw new IllegalArgumentException(\"Event not handled by DataStatisticsCoordinator: \" + event.getClass().getName()); }","typeGuard":null,"tryCatchPattern":"try { coordinator.handleEventFromOperator(subtask, event); } catch (IllegalArgumentException e) { /* log the unknown event class and check for version skew */ }","preventionTips":["Keep JobManager and TaskManager jar versions identical","Restart the whole cluster after upgrades instead of rolling mixed versions","Do not route custom OperatorEvents to DataStatisticsCoordinator"],"tags":["flink","operator-event","type-mismatch"],"backgroundTag":"unexpected-response-shape","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}