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


##########
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:
   and the spotless check:
   
   ```
   18:48:35 1: Task failed with an exception.
   18:48:35 -----------
   18:48:35 * What went wrong:
   18:48:35 Execution failed for task ':sdks:java:io:kafka:spotlessJavaCheck'.
   18:48:35 > The following files had format violations:
   18:48:35       
sdks/java/io/kafka/src/test/java/org/apache/beam/sdk/io/kafka/KafkaWriteSchemaTransformProviderTest.java
   18:48:35           @@ -20,9 +20,7 @@
   18:48:35            import·java.util.Arrays;
   18:48:35            import·java.util.List;
   18:48:35            
import·org.apache.beam.sdk.io.kafka.KafkaWriteSchemaTransformProvider.KafkaWriteSchemaTransform.ErrorCounterFn;
   18:48:35           
-import·org.apache.beam.sdk.io.kafka.KafkaWriteSchemaTransformProvider.KafkaWriteSchemaTransformConfiguration;
   18:48:35            import·org.apache.beam.sdk.schemas.Schema;
   18:48:35           
-import·org.apache.beam.sdk.schemas.transforms.SchemaTransform;
   18:48:35            import·org.apache.beam.sdk.schemas.utils.JsonUtils;
   18:48:35            import·org.apache.beam.sdk.testing.PAssert;
   18:48:35            import·org.apache.beam.sdk.testing.TestPipeline;
   18:48:35   Run './gradlew :sdks:java:io:kafka:spotlessApply' to fix these 
violations.
   
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to