beam icon indicating copy to clipboard operation
beam copied to clipboard

[Feature Request]: YAML API - allow specifying expansion service for java-backed providers when running on Flink

Open cliffsun91 opened this issue 1 year ago • 5 comments

What would you like to happen?

We're currently evaluating the usage of the Beam YAML API and running on Flink (in k8s). For the Python SDK harness we can specify --environment_type=EXTERNAL when submitting the pipeline (we run the Python SDK Harness as a side car container along side the Flink task manager). This all works fine if we submit a simple pipeline that doesn't use a transform that requires a Java provider (which I believe requires the expansion service). But as soon as we submit a pipeline that uses one (such as a Join or Sql) then it tries to start a docker container with the Beam Java SDK in our Flink task manager and there doesn't seem to be a way to tell it not to do that (or at least if there is it's not documented anywhere). We don't want to resort to DinD or DooD due to the security implications of doing this within a kubernetes cluster in production and also the unnecessary complexity around this.

There's an example here that shows if you're using the Beam Python SDK directly you can specify how to start the expansion service to avoid it trying to use docker: https://github.com/lydian/beam-python-flink-runner-examples/blob/master/docker/src/example.py#L47

If there is a way to do this when submitting via the YAML API then it would be good to have it documented clearly (as I've not found anything after extensive searching), or if not then could we consider support this?

Issue Priority

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

Issue Components

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

cliffsun91 avatar Jul 04 '25 09:07 cliffsun91

Have you tried --beam_services? For example, https://github.com/apache/beam/blob/master/release/src/main/scripts/run_rc_validation.sh#L839

liferoad avatar Jul 13 '25 19:07 liferoad

Hi @cliffsun91 . I'm having the same issue. Did you managed to solve the issue?

marlonbidu avatar Aug 12 '25 23:08 marlonbidu

We ended up abandoning our usage of Beam due to the complexities around running the various services. Whilst the YAML API looked promising it ties you into the Python SDK under the hood and we never really needed Python. Instead we're just using Flink directly and building our own YAML API (inspired by the Beam one) layer on top of Flink.

cliffsun91 avatar Aug 14 '25 17:08 cliffsun91

This issue has been marked as stale due to 150 days of inactivity. It will be closed in 30 days if no further activity occurs. If you think that’s incorrect or this issue still needs to be addressed, please simply write any comment. If closed, you can reopen the issue at any time. Thank you for your contributions.

github-actions[bot] avatar Jan 12 '26 12:01 github-actions[bot]

This issue has been closed due to lack of activity. If you think that is incorrect, you can reopen the issue at any time.

github-actions[bot] avatar Feb 11 '26 12:02 github-actions[bot]