tvalentyn commented on a change in pull request #14607:
URL: https://github.com/apache/beam/pull/14607#discussion_r617844777
##########
File path:
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowPipelineTranslator.java
##########
@@ -503,7 +509,16 @@ public void
visitPrimitiveTransform(TransformHierarchy.Node node) {
node.getFullName());
LOG.debug("Translating {}", transform);
currentTransform = node.toAppliedPTransform(getPipeline());
+ ResourceHints hints = transform.getResourceHints();
+ // AppliedPTransform instance stores resource hints of current transform
merged with outer
+ // hints (e.g. set on outer composites).
+ // Translation reads resource hints from PTransform objects, so update
the hints.
+ transform.setResourceHints(currentTransform.getResourceHints());
translator.translate(transform, this);
Review comment:
This seemed to be the least invasive change to pass the information
given current interface.
```
public interface TransformTranslator<TransformT extends PTransform> {
void translate(TransformT transform, TranslationContext context);
```
that is used in a lot of places. I recommend to leave it like this, but if
you think we need to change the interface we can file a Jira to revisit this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]