apache/iceberg · error · IllegalArgumentException
Invalid operator event type: ${eventClassCanonicalName}
Error message
Invalid operator event type: ${eventClassCanonicalName} What it means
DataStatisticsCoordinator.handleEventFromOperator dispatches operator events from subtasks: StatisticsEvent for statistics requests and RequestGlobalStatisticsEvent for global statistics requests. Any other OperatorEvent type is rejected with IllegalArgumentException naming the event class, because this coordinator only understands its own two event types.
Source
Thrown at flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/sink/shuffle/DataStatisticsCoordinator.java:322
}
}
@Override
public void handleEventFromOperator(int subtask, int attemptNumber, OperatorEvent event) {
runInCoordinatorThread(
() -> {
LOG.debug(
"Handling event from subtask {} (#{}) of {}: {}",
subtask,
attemptNumber,
operatorName,
event);
if (event instanceof StatisticsEvent) {
handleDataStatisticRequest(subtask, ((StatisticsEvent) event));
} else if (event instanceof RequestGlobalStatisticsEvent) {
handleRequestGlobalStatisticsEvent(subtask, (RequestGlobalStatisticsEvent) event);
} else {
throw new IllegalArgumentException(
"Invalid operator event type: " + event.getClass().getCanonicalName());
}
},
String.format(
Locale.ROOT,
"handling operator event %s from subtask %d (#%d)",
event.getClass(),
subtask,
attemptNumber));
}
@Override
public void checkpointCoordinator(long checkpointId, CompletableFuture<byte[]> resultFuture) {
runInCoordinatorThread(
() -> {
LOG.debug(
"Snapshotting data statistics coordinator {} for checkpoint {}",
operatorName,View on GitHub (pinned to 86d9c8fc54)
Solutions
- Ensure all job nodes (JobManager and TaskManagers) run the same Iceberg/Flink connector version so event classes match
- Check for custom code or framework features sending operator events to the Iceberg sink coordinator that it does not support
- Restart the job from a clean state; stale events from a previous failed run can be delivered after restart
- If reproducible with a single version, file an Iceberg issue with the event class name from the message
Defensive patterns
Strategy: validation
Validate before calling
if (!(event instanceof StatisticsEvent) && !(event instanceof RequestGlobalStatisticsEvent)) {
throw new IllegalArgumentException("Event not accepted by DataStatisticsCoordinator: " + event.getClass().getCanonicalName());
} Type guard
static boolean isAcceptedOperatorEvent(OperatorEvent event) {
return event instanceof StatisticsEvent || event instanceof RequestGlobalStatisticsEvent;
} Prevention
- Never send custom OperatorEvents to the Iceberg sink coordinator
- Pin one connector version across JobManager and all TaskManagers
- Fully cancel old jobs before starting replacements that share event channels
When it happens
Trigger: An OperatorEvent arrives at the coordinator that is neither StatisticsEvent nor RequestGlobalStatisticsEvent — e.g. a custom event sent via OperatorEventSender to the coordinator, or a version-mismatched job sending a different event class to this endpoint.
Common situations: Mixing Iceberg versions in a job (old task code sending event types the new coordinator doesn't know), speculative-execution or failover artifacts delivering unexpected events, or user code sending custom operator events to the sink coordinator.
Related errors
- Invalid operator event type:
- Invalid operator event type:
- Invalid operator event type: <event.getClass().getCanonicalN
- Invalid operator event type: <event.getClass().getCanonicalN
- Invalid operator event type: <event.getClass().getCanonicalN
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/a471cd0f9f4246e6.
Report an issue: GitHub.