-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Populate TransformIOMap as Config for Beam Samza Runner #26276
Conversation
R: @xinyuiscool @mynameborat please take a look |
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control |
General questions
@xinyuiscool in case you have something to chime in on leveraging protobuf representations |
|
This is an internal configuration not for external consumption for user. I'd rather keep it hidden than have it readable. If you want it for debug purpose, you can use the debug logs to infer as opposed to exposing this configuration externally.
It is external facing so that we can render the DAG for observability. It is not necessarily used internally.
All said, If we can't leverage the protobuf representation of the pipeline, can we use |
@mynameborat Found a way to use BEAM_JSON_GRAPH to attach transformIoInfo in addition to graphLinks and the graph there - check the ExpectedDag as the sample.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for leveraging existing beam json graph. Looks good to me.
runners/samza/src/main/java/org/apache/beam/runners/samza/SamzaRunner.java
Outdated
Show resolved
Hide resolved
runners/samza/src/main/java/org/apache/beam/runners/samza/SamzaRunner.java
Outdated
Show resolved
Hide resolved
final ConfigBuilder configBuilder = new ConfigBuilder(options); | ||
|
||
SamzaPipelineTranslator.createConfig( | ||
pipeline, options, idMap, nonUniqueStateIds, configBuilder); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's refactor this method a bit to pass in the previously created ConfigContext instead of options, idMap, nonUni.. That way the code is much more readable and extendable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
* Builds a map from PTransform to its input and output PValues. The map is serialized and stored | ||
* in the job config. | ||
*/ | ||
public static Map<String, Map.Entry<String, String>> buildTransformIOMap( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this to the json renderer class. This method has nothing to do with translation. Please also think about whether this needs a separate scan of pipeline or we can consolidate with the scan inside Json renderer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved it to JSON renderer, it still needs to be a separate scan of the pipeline using SamzaPipelineVisitor instead of a generic Beam PipelineVisitor which is used by the JSONRenderer reason being SamzaPipelineVisitor traverses the pipeline differently (does not enter some composite transforms I if they can be directly translated). The PValues Maps we need for MetricOp stuff at runtime need to be populated using this traversal logic from SamzaPipelineVisitor
runners/samza/src/main/java/org/apache/beam/runners/samza/util/PipelineJsonRenderer.java
Outdated
Show resolved
Hide resolved
runners/samza/src/main/java/org/apache/beam/runners/samza/util/PipelineJsonRenderer.java
Outdated
Show resolved
Hide resolved
runners/samza/src/main/java/org/apache/beam/runners/samza/SamzaRunner.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for the clean up.
* Populate TransformIOMap as Config for Beam Samza Runner (apache#26276) * Basic Opeartor Metric Support For Non Data Shuffle Operators for Samza Runner * Add end to end test * Minor nitpicks * Update test version for internal release testing * Minor Fixes
Summary
Tests
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
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, commentfixes #<ISSUE NUMBER>
instead.CHANGES.md
with noteworthy changes.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)
See CI.md for more information about GitHub Actions CI.