apache/beam

[Feature Request]: Add a native Logging transform to Java SDK

Open

#38,528 opened on 2026年5月18日

GitHub で見る
 (4 comments) (0 reactions) (2 assignees)Java (4,097 forks)batch import
P2good first issuejavanew feature

Repository metrics

Stars
 (7,313 stars)
PR merge metrics
 (平均マージ 6d) (30d で 243 merged PRs)

説明

What would you like to happen?

AFAIK the Java SDK doesn't have an easy utility to print/log the outputs of a PCollection. I've always had to hack something together like:

    rows.apply(MapElements.into(strings()).via(row -> {
      System.out.println("row: " + row);
      return "";
    }));

Would be nice to have an easy utility that can be used like:

    rows.apply(Log.info());

The Python SDK has something like this: https://github.com/apache/beam/blob/26c6ec7cb749d60455c9895aa1be49d5cf552a75/sdks/python/apache_beam/transforms/util.py#L2183-L2197

Issue Priority

Priority: 2 (default / most feature requests should be filed as P2)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam YAML
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Infrastructure
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Prism Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner

コントリビューターガイド