{"record":{"id":"ca209094f93e9368","repo":"apache/beam","slug":"unknown-type-of-s-s","errorCode":null,"errorMessage":"Unknown type of %s %s","messagePattern":"Unknown type of (.+?) (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"sdks/java/core/src/main/java/org/apache/beam/sdk/util/construction/graph/GreedyStageFuser.java","lineNumber":127,"sourceCode":"      PCollectionFusibility fusibility =\n          canFuse(pipeline, candidate, environment, fusedCollections);\n      switch (fusibility) {\n        case MATERIALIZE:\n          materializedPCollections.add(candidate);\n          break;\n        case FUSE:\n          // All of the consumers of the candidate PCollection can be fused into this stage. Do so.\n          fusedCollections.add(candidate);\n          fusedTransforms.addAll(pipeline.getPerElementConsumers(candidate));\n          for (PipelineNode.PTransformNode consumer : pipeline.getPerElementConsumers(candidate)) {\n            // The outputs of every transform fused into this stage must be either materialized or\n            // themselves fused away, so add them to the set of candidates.\n            fusionCandidates.addAll(pipeline.getOutputPCollections(consumer));\n            sideInputs.addAll(pipeline.getSideInputs(consumer));\n          }\n          break;\n        default:\n          throw new IllegalStateException(\n              String.format(\n                  \"Unknown type of %s %s\",\n                  PCollectionFusibility.class.getSimpleName(), fusibility));\n      }\n    }\n\n    return ImmutableExecutableStage.ofFullComponents(\n        pipeline.getComponents(),\n        environment,\n        inputPCollection,\n        sideInputs,\n        userStates,\n        timers,\n        fusedTransforms.build(),\n        materializedPCollections,\n        ExecutableStage.DEFAULT_WIRE_CODER_SETTINGS);\n  }\n","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/util/construction/graph/GreedyStageFuser.java#L109-L145","documentation":"Thrown by GreedyStageFuser.forGrpcPortRead when a consumer PCollection's PCollectionFusibility is an unrecognized/unsupported enum value. The fuser only handles the fusibility cases it knows; an unknown value means the enum or graph analysis produced something outside the expected set.","triggerScenarios":"Fusing an executable stage around a gRPC port read when pipeline.getPCollectionFusibility(consumer) returns an enum constant not covered by the switch — typically a new enum member from a newer Beam version, or a corrupted/unmapped fusibility result.","commonSituations":"Version skew between the graph-building code and the fusibility analysis; custom runner plugins that extend fusibility semantics; stale shaded copies of Beam internals.","solutions":["Use consistent Beam versions for all pipeline-construction and fusion components.","Add the new PCollectionFusibility case to the switch in GreedyStageFuser.forGrpcPortRead if you introduced one.","Check for duplicate/shaded beam-runner jars supplying an older enum.","Log the fusibility value to identify which enum constant is unhandled."],"exampleFix":"// before\nswitch (fusibility) { case FUSIBLE: ...; case NOT_FUSABLE: ...; }\n// after\nswitch (fusibility) { case FUSIBLE: ...; case NOT_FUSABLE: ...; case NEW_MEMBER: /* handle */ break; }","handlingStrategy":"try-catch","validationCode":"PCollectionFusibility f = pipeline.getPCollectionFusibility(consumer);\nif (f != PCollectionFusibility.FUSIBLE && f != PCollectionFusibility.NOT_FUSABLE) throw new IllegalStateException(\"Unhandled fusibility: \" + f);","typeGuard":"boolean isHandled(PCollectionFusibility f) { return f == PCollectionFusibility.FUSIBLE || f == PCollectionFusibility.NOT_FUSABLE; }","tryCatchPattern":"try { stage = GreedyStageFuser.forGrpcPortRead(pipeline, read, fusedPcolls); } catch (IllegalStateException e) { log.error(\"Fusion hit unknown PCollectionFusibility\", e); throw e; }","preventionTips":["Keep fusion and graph-analysis code from the same Beam version","Add switch cases for every PCollectionFusibility constant when upgrading","Check for shaded duplicate copies of beam-runner classes"],"tags":["java","beam","fusion","enum","runner"],"backgroundTag":"invalid-enum-value","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}