boyuanzz commented on a change in pull request #11749:
URL: https://github.com/apache/beam/pull/11749#discussion_r434890835



##########
File path: 
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java
##########
@@ -817,6 +847,24 @@ public void setValueDeserializer(String valueDeserializer) 
{
       return toBuilder().setCommitOffsetsInFinalizeEnabled(true).build();
     }
 
+    /**
+     * The {@link Read} transform will be expanded with {@link 
ReadFromKafkaViaSDF} transform. While
+     * working with {@link #useSDFTransformInRead()} and {@link
+     * #withTimestampPolicyFactory(TimestampPolicyFactory)} together, only 
{@link
+     * TimestampPolicyFactory#withCreateTime(Duration)}, {@link
+     * TimestampPolicyFactory#withLogAppendTime()} and {@link
+     * TimestampPolicyFactory#withProcessingTime()} will be populated 
correctly. For other custom
+     * {@link TimestampPolicy}, the transform will use {@link
+     * TimestampPolicyFactory#withProcessingTime()} by default. It's 
recommended to use {@link
+     * ReadFromKafkaViaSDF} directly in that case.
+     *
+     * <p>Note that the expansion only happens when tbe pipeline has 
"beam_fn_api" experiment and
+     * meanwhile "beam_fn_api_use_deprecated_read" is not set.
+     */
+    public Read<K, V> useSDFTransformInRead() {

Review comment:
       Discussed with Luke offline. We think it would be better to make 
`KafkaIO.Read()` expand with SDF transform bu default when `beam_fn_api` is 
enabled( before introducing this SDF transform, we expand the `Read` with 
SDFUnboundedWrapper with beam_fn_api).




----------------------------------------------------------------
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]


Reply via email to