danny0405 commented on code in PR #12608:
URL: https://github.com/apache/hudi/pull/12608#discussion_r1920931154


##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/realtime/RealtimeUnmergedRecordReader.java:
##########
@@ -105,16 +109,20 @@ private List<HoodieProducer<ArrayWritable>> 
getParallelProducers(
   ) {
     return Arrays.asList(
         new FunctionBasedQueueProducer<>(queue -> {
-          HoodieUnMergedLogRecordScanner scanner =
-              scannerBuilder.withLogRecordScannerCallback(record -> {
-                    // convert Hoodie log record to Hadoop AvroWritable and 
buffer
-                    GenericRecord rec = (GenericRecord) 
record.toIndexedRecord(getReaderSchema(), payloadProps).get().getData();
-                    ArrayWritable aWritable = (ArrayWritable) 
HoodieRealtimeRecordReaderUtils.avroToArrayWritable(rec, getHiveSchema(), 
isSupportTimestamp());
-                    queue.insertRecord(aWritable);
-                  })
-                  .build();
-          // Scan all the delta-log files, filling in the queue
-          scanner.scan();
+          HoodieUnMergedLogRecordScanner scanner = scannerBuilder.build();

Review Comment:
   The `BoundedMemoryRecords` can be eliminated.



-- 
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: commits-unsubscr...@hudi.apache.org

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

Reply via email to