You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by GitBox <gi...@apache.org> on 2020/03/09 17:55:56 UTC

[GitHub] [beam] boyuanzz commented on a change in pull request #11069: [DO NOT SUBMIT] Test UW + Dataflow + Kafka + UnboundedSource SDF wrapper

boyuanzz commented on a change in pull request #11069: [DO NOT SUBMIT] Test UW + Dataflow + Kafka + UnboundedSource SDF wrapper
URL: https://github.com/apache/beam/pull/11069#discussion_r389862405
 
 

 ##########
 File path: sdks/java/core/src/main/java/org/apache/beam/sdk/io/Read.java
 ##########
 @@ -222,13 +222,13 @@ private Unbounded(@Nullable String name, UnboundedSource<T, ?> source) {
                         new UnboundedSourceAsSDFWrapperFn<>(
                             (Coder<CheckpointMark>) source.getCheckpointMarkCoder())))
                 .setCoder(ValueWithRecordIdCoder.of(source.getOutputCoder()));
-        // TODO(BEAM-2939): Add support for deduplication.
-        // if (source.requiresDeduping()) {
-        //   outputWithIds.apply(
-        //       Distinct.<ValueWithRecordId<T>, byte[]>withRepresentativeValueFn(
-        //               element -> element.getId())
-        //           .withRepresentativeType(TypeDescriptor.of(byte[].class)));
-        // }
+
+        if (source.requiresDeduping()) {
+          outputWithIds.apply(
+              Deduplicate.<ValueWithRecordId<T>, byte[]>withRepresentativeValueFn(
 
 Review comment:
   Is this `Deduplicate` the one using Timer/State?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services