You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "nickuncaged1201 (via GitHub)" <gi...@apache.org> on 2023/05/09 22:19:13 UTC

[GitHub] [beam] nickuncaged1201 commented on a diff in pull request #26575: Kafka write metrics and tests

nickuncaged1201 commented on code in PR #26575:
URL: https://github.com/apache/beam/pull/26575#discussion_r1189183284


##########
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaWriteSchemaTransformProvider.java:
##########
@@ -99,13 +144,21 @@ public PCollectionRowTuple expand(PCollectionRowTuple input) {
                   : AvroUtils.getRowToAvroBytesFunction(inputSchema);
 
           final Map<String, String> configOverrides = configuration.getProducerConfigUpdates();
-          input
-              .get("input")
-              .apply(
-                  "Map Rows to Kafka Messages",
-                  MapElements.via(
-                      new SimpleFunction<Row, KV<byte[], byte[]>>(
-                          row -> KV.of(new byte[1], toBytesFn.apply(row))) {}))
+          PCollectionTuple outputTuple =
+              input
+                  .get("input")
+                  // .apply(

Review Comment:
   fixed. The commented out part is the previous code before my change



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

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org