boyuanzz commented on a change in pull request #11192: [BEAM-9430] Fix coder
sent to Dataflow service for non-portable pipelines due to WatermarkEstimators
migration change
URL: https://github.com/apache/beam/pull/11192#discussion_r396629104
##########
File path:
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowPipelineTranslator.java
##########
@@ -978,12 +978,16 @@ public void translate(ParDo.MultiOutput transform,
TranslationContext context) {
if (context.isFnApi()) {
DoFnSignature signature =
DoFnSignatures.signatureForDoFn(transform.getFn());
if (signature.processElement().isSplittable()) {
- Coder<?> restrictionCoder =
- DoFnInvokers.invokerFor(transform.getFn())
- .invokeGetRestrictionCoder(
-
context.getInput(transform).getPipeline().getCoderRegistry());
+ DoFnInvoker<?, ?> doFnInvoker =
DoFnInvokers.invokerFor(transform.getFn());
+ Coder<?> restrictionAndWatermarkStateCoder =
+ KvCoder.of(
+ doFnInvoker.invokeGetRestrictionCoder(
+
context.getInput(transform).getPipeline().getCoderRegistry()),
+ doFnInvoker.invokeGetWatermarkEstimatorStateCoder(
Review comment:
Thanks for the explanation!
----------------------------------------------------------------
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]
With regards,
Apache Git Services