apache/beam · error · IllegalArgumentException
Unknown accumulation mode [${accumulationMode}]
Error message
Unknown accumulation mode [${accumulationMode}] What it means
WindowBuilder.accumulationMode() maps an AccumulationMode enum to the corresponding Beam windowing behavior (discarding/accumulating fired panes). An unrecognized mode hits the default branch and throws IllegalArgumentException listing the unsupported mode.
Source
Thrown at sdks/java/extensions/euphoria/src/main/java/org/apache/beam/sdk/extensions/euphoria/core/client/operator/WindowBuilder.java:93
}
@Override
public WindowBuilder<T> triggeredBy(Trigger trigger) {
window = requireNonNull(window).triggering(trigger);
return this;
}
@Override
public WindowBuilder<T> accumulationMode(WindowingStrategy.AccumulationMode accumulationMode) {
switch (requireNonNull(accumulationMode)) {
case DISCARDING_FIRED_PANES:
window = requireNonNull(window).discardingFiredPanes();
break;
case ACCUMULATING_FIRED_PANES:
window = requireNonNull(window).accumulatingFiredPanes();
break;
default:
throw new IllegalArgumentException("Unknown accumulation mode [" + accumulationMode + "]");
}
return this;
}
@Override
public WindowBuilder<T> withAllowedLateness(Duration allowedLateness) {
window = requireNonNull(window).withAllowedLateness(requireNonNull(allowedLateness));
return this;
}
@Override
public WindowBuilder<T> withAllowedLateness(
Duration allowedLateness, Window.ClosingBehavior closingBehavior) {
window =
requireNonNull(window)
.withAllowedLateness(requireNonNull(allowedLateness), requireNonNull(closingBehavior));
return this;
}View on GitHub (pinned to 12126d8942)
Solutions
- Use only accumulation modes supported by the builder (e.g. ACCUMULATING_FIRED_PANES or the default discarding behavior).
- Check the euphoria extension source for the exact set of handled modes at your Beam version.
- Upgrade or patch the euphoria extension if a newly added AccumulationMode constant is required.
Example fix
// before builder.accumulationMode(AccumulationMode.RETRACTING_FIRED_PANES); // after builder.accumulationMode(AccumulationMode.ACCUMULATING_FIRED_PANES);
Defensive patterns
Strategy: validation
Validate before calling
if (mode != AccumulationMode.DISCARDING_FIRED_PANES
&& mode != AccumulationMode.ACCUMULATING_FIRED_PANES) {
throw new IllegalArgumentException("Unsupported accumulation mode: " + mode);
} Try / catch
try {
builder.accumulationMode(mode);
} catch (IllegalArgumentException e) {
builder.accumulationMode(AccumulationMode.ACCUMULATING_FIRED_PANES);
} Prevention
- Only pass modes verified against the euphoria WindowBuilder source for your Beam version.
- Pin the Beam version and re-verify enum coverage on upgrades.
- Default to DISCARDING/ACCUMULATING fired panes in configuration templates.
When it happens
Trigger: Calling windowBuilder.accumulationMode(AccumulationMode.X) with a mode not handled by the switch (the code handles DISCARDING_FIRED_PANES, ACCUMULATING_FIRED_PANES, and possibly others; e.g. RETRACTING or UNSPECIFIED-style values fall through), typically inside a Window.into(...).triggering(...).accumulationMode(...) chain.
Common situations: Upgrading Beam where AccumulationMode gained new constants while the euphoria WindowBuilder switch wasn't extended; typos/mismatches when porting Flink-style accumulation settings to Beam euphoria.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Unknown policy ${policy}
- Cannot convert unknown %s to %s: %s
- Unknown failure mode + failureMode
- Unrecognized value for stable unique names:
- Cannot encode null window
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/87c8ea328eb85960.
Report an issue: GitHub.