{"record":{"id":"8a320286fe5ff671","repo":"apache/beam","slug":"restriction-unsupported-in-s","errorCode":null,"errorMessage":"Restriction unsupported in %s","messagePattern":"Restriction unsupported in (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnInvoker.java","lineNumber":414,"sourceCode":"      throw new UnsupportedOperationException(\n          String.format(\"Row OutputReceiver unsupported in %s\", getErrorContext()));\n    }\n\n    @Override\n    public MultiOutputReceiver taggedOutputReceiver(DoFn<InputT, OutputT> doFn) {\n      throw new UnsupportedOperationException(\n          String.format(\"MultiOutputReceiver unsupported in %s\", getErrorContext()));\n    }\n\n    @Override\n    public Object restriction() {\n      throw new UnsupportedOperationException(\n          String.format(\"Restriction unsupported in %s\", getErrorContext()));\n    }\n\n    @Override\n    public BoundedWindow window() {\n      throw new UnsupportedOperationException(\n          String.format(\"BoundedWindow unsupported in %s\", getErrorContext()));\n    }\n\n    @Override\n    public PaneInfo paneInfo(DoFn<InputT, OutputT> doFn) {\n      throw new UnsupportedOperationException(\n          String.format(\"PaneInfo unsupported in %s\", getErrorContext()));\n    }\n\n    @Override\n    public PipelineOptions pipelineOptions() {\n      throw new UnsupportedOperationException(\n          String.format(\"PipelineOptions unsupported in %s\", getErrorContext()));\n    }\n\n    @Override\n    public DoFn<InputT, OutputT>.StartBundleContext startBundleContext(DoFn<InputT, OutputT> doFn) {\n      throw new UnsupportedOperationException(","sourceCodeStart":396,"sourceCodeEnd":432,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnInvoker.java#L396-L432","documentation":"restriction() throws UnsupportedOperationException because this invoker has no restriction provider bound. It is used by splittable DoFn (SDF) machinery to access the current restriction. The error context identifies the unsupported invoker.","triggerScenarios":"Accessing invoker.restriction() on a DelegatingDoFnInvoker or an invoker built without a restrictionFactory; splittable-DoFn code paths (e.g. @GetInitialRestriction, @ProcessElement with RestrictionTracker) invoked through a non-SDF invoker.","commonSituations":"Using a splittable DoFn on a runner or test harness without SDF support; invoking SDF methods via DoFnInvokers without binding restriction tracking; older Beam version where the runner lacked SDF support.","solutions":["Execute the SDF through a runner that supports splittable DoFn and wires restriction providers","Bind a restriction factory when constructing the invoker","Verify the DoFn's element type/restriction tracker are properly parameterized for SDF","Upgrade Beam / runner to a version with SDF support"],"exampleFix":"// before\nObject r = invoker.restriction(); // throws\n// after\nRestrictionTracker<?, ?> tracker = context.getRestrictionTracker(); // runner-provided","handlingStrategy":"validation","validationCode":"boolean sdf = doFn instanceof DoFn.RequiresSplitPoll; // or check RestrictionTracker presence in context","typeGuard":"null","tryCatchPattern":"try { Object r = invoker.restriction(); } catch (UnsupportedOperationException e) { throw new IllegalStateException(\"SDF context required\", e); }","preventionTips":["Use splittable DoFns only on runners with SDF support","Never invoke SDF lifecycle methods through a bare invoker","Keep Beam/runner versions current for SDF features"],"tags":["apache-beam","java","unsupported-operation","splittable-dofn"],"backgroundTag":"unsupported-operation","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}