apache/beam

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

Open

#38,528 建立於 2026年5月18日

在 GitHub 查看
 (4 留言) (0 反應) (2 負責人)Java (4,097 fork)batch import
P2good first issuejavanew feature

倉庫指標

Star
 (7,313 star)
PR 合併指標
 (平均合併 6天) (30 天內合併 243 個 PR)

描述

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

貢獻者指南