apache/beam · error
failed to make node with node id
Error message
failed to make node %v with node id %v
What it means
makeNode converts a graph.Node into a pipepb.PCollection. First it must register the node's windowing strategy via addWindowingStrategy; if that fails the error is wrapped as 'failed to make node %v with node id %v'. Called from expandCoGBK, expandReshuffle, and addNode, it is the choke point for all PCollection creation during marshalling.
Solutions
- Read the wrapped inner error — the root cause is almost always in MarshalWindowingStrategy
- Ensure PCollections use standard windowing functions (Global, Fixed, Sliding, Sessions)
- Avoid unsupported trigger/accumulation mode combinations on windows
- Upgrade the Go SDK if you rely on recently added windowing features
Example fix
null
Defensive patterns
Strategy: try-catch
Validate before calling
// all PCollections must carry a marshalable windowing strategy
if n.WindowingStrategy() == nil || !isSupportedWindow(n.WindowingStrategy().Fn()) {
return errors.New("node windowing strategy not marshalable")
} Type guard
func marshalableNode(n *graph.Node) bool {
return n != nil && n.WindowingStrategy() != nil
} Try / catch
if err := beam.Run(ctx, pr); err != nil {
if strings.Contains(err.Error(), "failed to make node") {
// root cause is in the wrapped windowing-strategy error
log.Printf("node creation failed; check windowing: %+v", err)
}
return err
} Prevention
- Stick to standard window functions and triggers
- Avoid manually mutating graph nodes
- Test pipeline marshalling locally before runner submission
When it happens
Trigger: Any PCollection whose WindowingStrategy fails MarshalWindowingStrategy — e.g. custom window functions, unsupported trigger/closure/accumulation combos — passed through addNode while marshalling the pipeline.
Common situations: Using unsupported windowing (custom WindowFn) or unusual trigger settings on a PCollection; SDK version where a windowing feature isn't marshalable; corrupted graph nodes from manual graph construction.
Related errors
- failed to add window strategy
- Invalid PCollection
- missing corresponding pcollection of named output
- AfterProcessingTime trigger set without a delay or…
- array len mismatch. decoding
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/512f04ef10209263.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/go/pkg/beam/core/runtime/graphx/translate.go:1183
func (m *marshaller) addNode(n *graph.Node) (string, error) {
id := nodeID(n)
if _, exists := m.pcollections[id]; exists {
return id, nil
}
// TODO(herohde) 11/15/2017: expose UniqueName to user.
cid, err := m.coders.Add(n.Coder)
if err != nil {
return "", err
}
return m.makeNode(id, cid, n)
}
func (m *marshaller) makeNode(id, cid string, n *graph.Node) (string, error) {
windowingStrategyId, err := m.addWindowingStrategy(n.WindowingStrategy())
if err != nil {
return "", errors.Wrapf(err, "failed to make node %v with node id %v", n, id)
}
col := &pipepb.PCollection{
UniqueName: id,
CoderId: cid,
IsBounded: boolToBounded(n.Bounded()),
WindowingStrategyId: windowingStrategyId,
}
m.pcollections[id] = col
return id, nil
}
func boolToBounded(bounded bool) pipepb.IsBounded_Enum {
if bounded {
return pipepb.IsBounded_BOUNDED
}
return pipepb.IsBounded_UNBOUNDED
}View on GitHub (pinned to 12126d8942)