danny0405 commented on code in PR #9403:
URL: https://github.com/apache/hudi/pull/9403#discussion_r1289505153
##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/helpers/AvroConvertor.java:
##########
@@ -175,9 +176,12 @@ public GenericRecord
withKafkaFieldsAppended(ConsumerRecord consumerRecord) {
for (Schema.Field field : record.getSchema().getFields()) {
recordBuilder.set(field, record.get(field.name()));
}
+
+ String kafkaKey = String.valueOf(consumerRecord.key());
recordBuilder.set(KAFKA_SOURCE_OFFSET_COLUMN, consumerRecord.offset());
recordBuilder.set(KAFKA_SOURCE_PARTITION_COLUMN,
consumerRecord.partition());
recordBuilder.set(KAFKA_SOURCE_TIMESTAMP_COLUMN,
consumerRecord.timestamp());
+ recordBuilder.set(KAFKA_SOURCE_KEY_COLUMN, kafkaKey);
Review Comment:
```suggestion
recordBuilder.set(KAFKA_SOURCE_KEY_COLUMN,
String.valueOf(consumerRecord.key()));
```
--
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]