apache/beam · error · UnsupportedOperationException

PaneInfo unsupported in %s

Error message

PaneInfo unsupported in %s

What it means

paneInfo() throws UnsupportedOperationException because this invoker has no PaneInfo provider bound. PaneInfo describes triggering/pane index for late-data and triggering scenarios; without a provider the invoker cannot supply it. The error context names the unsupported invoker.

Source

Thrown at sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnInvoker.java:426

      throw new UnsupportedOperationException(
          String.format("Restriction unsupported in %s", getErrorContext()));
    }

    @Override
    public BoundedWindow window() {
      throw new UnsupportedOperationException(
          String.format("BoundedWindow unsupported in %s", getErrorContext()));
    }

    @Override
    public PaneInfo paneInfo(DoFn<InputT, OutputT> doFn) {
      throw new UnsupportedOperationException(
          String.format("PaneInfo unsupported in %s", getErrorContext()));
    }

    @Override
    public PipelineOptions pipelineOptions() {
      throw new UnsupportedOperationException(
          String.format("PipelineOptions unsupported in %s", getErrorContext()));
    }

    @Override
    public DoFn<InputT, OutputT>.StartBundleContext startBundleContext(DoFn<InputT, OutputT> doFn) {
      throw new UnsupportedOperationException(
          String.format("StartBundleContext unsupported in %s", getErrorContext()));
    }

    @Override
    public DoFn<InputT, OutputT>.FinishBundleContext finishBundleContext(
        DoFn<InputT, OutputT> doFn) {
      throw new UnsupportedOperationException(
          String.format("FinishBundleContext unsupported in %s", getErrorContext()));
    }

    @Override
    public DoFn<InputT, OutputT>.OnTimerContext onTimerContext(DoFn<InputT, OutputT> doFn) {

View on GitHub (pinned to 12126d8942)

Solutions

  1. Take PaneInfo as a @ProcessElement/@OnTimer method parameter so the runner injects it
  2. Bind a paneInfo factory when constructing the invoker
  3. Check that the runner supports triggering/pane info (e.g. proper streaming runner)
  4. Avoid paneInfo access in contexts known to be non-triggered (treat unsupported as PaneInfo.NO_FIRING)

Example fix

// before
PaneInfo pi = context.paneInfo(); // throws
// after
@ProcessElement
public void process(ProcessContext c, PaneInfo pane) { /* use pane */ }
Defensive patterns

Strategy: type-guard

Validate before calling

boolean paneAware = context instanceof /* context exposing PaneInfo */;

Type guard

null

Try / catch

try { PaneInfo pi = invoker.paneInfo(doFn); } catch (UnsupportedOperationException e) { pi = PaneInfo.NO_FIRING; }

Prevention

When it happens

Trigger: Calling paneInfo(DoFn) on a base DelegatingDoFnInvoker; DoFn code calling context.paneInfo() in a runner or test harness that does not provide pane information.

Common situations: DoFns handling triggered/late panes executed on a runner without pane-info support; unit tests invoking the DoFn with a stub invoker that omits paneInfo.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/7ec977ce0e83df29. Report an issue: GitHub.