apache / apache/beam

Add TO_STRING capability to Go SDK

Open
#21,604 0 comments 0 reactions 0 assignees View on GitHub
go improvement P2
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

Go SDK doesn't yet implement TO_STRING, which is necessary for runner hotkey debugging among other things.

URN description:
https://github.com/apache/beam/blob/master/model/pipeline/src/main/proto/org/apache/beam/model/pipeline/v1/beam_runner_api.proto#L329

Involves adding the capability URN "beam:transform:to_string:v1" to the goCapabilities list in graphx/translate.go and the paired handling in exec/translate.go along with the appropriate node to convert elements to strings using fmt.

Using fmt allows user element types to have String() implemented, which will then appear as normal. However, we should also print out the %T for the type, to make it unambiguous for users to know the type of the hot key, which will reduce debugging turn around.

AFAIK only used with Dataflow when "Hot Key Logging" https://cloud.devsite.corp.google.com/dataflow/docs/reference/pipeline-options#debugging is enabled, and there's no closed form runner test for this at present.

Imported from Jira [BEAM-14512](https://issues.apache.org/jira/browse/BEAM-14512). Original Jira may contain additional context.
Reported by: lostluck.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.