Skip to content

Fixed the broken beam python on flink with PortableRunner#33061

Merged
liferoad merged 2 commits intoapache:masterfrom
liferoad:beam-on-flink
Nov 11, 2024
Merged

Fixed the broken beam python on flink with PortableRunner#33061
liferoad merged 2 commits intoapache:masterfrom
liferoad:beam-on-flink

Conversation

@liferoad
Copy link
Copy Markdown
Contributor

@liferoad liferoad commented Nov 8, 2024

Tested this locally by building the beam-flink-runner container image and running the simple test.

Created flink-conf/flink-conf.yaml and the yaml file contains:

parallelism.default: 23
taskmanager.memory.network.fraction: 0.2
taskmanager.memory.network.max: 2gb

Then started the container:

docker run --net=host -v /path/flink-conf:/flink-conf beam-flink-runner

Simple test:

import apache_beam as beam

from apache_beam.options.pipeline_options import PipelineOptions

options = PipelineOptions([
    "--runner=PortableRunner",
    "--job_endpoint=localhost:8099",
    "--environment_type=LOOPBACK"
])

with beam.Pipeline(options=options) as pipeline:
  elements = pipeline | beam.Create([1, 2, 3, 4, 5])

  # Use Map to apply a function to each element
  elements | 'Print elements' >> beam.Map(print)

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 8, 2024

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @damccorm for label website.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

Copy link
Copy Markdown
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@liferoad
Copy link
Copy Markdown
Contributor Author

Add a note here: no need to change the docker entrypoint. We can pass in --flink-conf-dir /flink-conf directly when calling docker run. See #33182

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants