the-other-tim-brown commented on code in PR #13694:
URL: https://github.com/apache/hudi/pull/13694#discussion_r2265019448
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/cdc/CDCFileGroupIterator.scala:
##########
@@ -516,17 +525,19 @@ class CDCFileGroupIterator(split: HoodieCDCFileGroupSplit,
.withBufferSize(HoodieMetadataConfig.MAX_READER_BUFFER_SIZE_PROP.defaultValue)
.withPartition(partitionPath)
.withMetaClient(metaClient)
- .withRecordBuffer(recordBuffer)
+ .withRecordBuffer(keyBasedFileGroupRecordBuffer.get())
.build
-
CloseableIteratorListener.addListener(recordBuffer.getLogRecordIterator).asScala
+
CloseableIteratorListener.addListener(keyBasedFileGroupRecordBuffer.get().getLogRecordIterator).asScala
}
/**
* Convert InternalRow to json string.
*/
- private def convertRowToJsonString(record: InternalRow): UTF8String = {
- internalRowToJsonStringConverter.convert(record)
+ private def convertBufferedRecordToJsonString(record:
BufferedRecord[InternalRow]): UTF8String = {
+ internalRowToJsonStringConverterMap.getOrElseUpdate(record.getSchemaId,
+ new
InternalRowToJsonStringConverter(HoodieInternalRowUtils.getCachedSchema(readerContext.getRecordContext.decodeAvroSchema(record.getSchemaId))))
Review Comment:
Should the second arg be a supplier?
--
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]