You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/10/08 03:49:06 UTC

[GitHub] [hudi] danny0405 commented on a diff in pull request #6818: [HUDI-4948] Improve CDC Write

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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieCDCLogger.java:
##########
@@ -73,35 +80,56 @@ public class HoodieCDCLogger implements Closeable {
 
   private final Schema cdcSchema;
 
-  private final String cdcSchemaString;
-
   // the cdc data
   private final Map<String, HoodieAvroPayload> cdcData;
 
+  private final Map<HoodieLogBlock.HeaderMetadataType, String> cdcDataBlockHeader;
+
   // the cdc record transformer
   private final CDCTransformer transformer;
 
+  // Max block size to limit to for a log block
+  private final int maxBlockSize;
+
+  // Average cdc record size. This size is updated at the end of every log block flushed to disk
+  private long averageCDCRecordSize = 0;
+
+  // Number of records that must be written to meet the max block size for a log block
+  private AtomicInteger numOfCDCRecordInMemory = new AtomicInteger();
+

Review Comment:
   `numOfCDCRecordInMemory` -> `numOfCDCRecordsInMemory`



-- 
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-unsubscribe@hudi.apache.org

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