voonhous commented on code in PR #17785:
URL: https://github.com/apache/hudi/pull/17785#discussion_r3346814188


##########
hudi-hadoop-common/src/main/java/org/apache/hudi/common/table/log/HoodieLogFormatWriter.java:
##########
@@ -207,23 +206,29 @@ private int getLogBlockLength(int contentLength, int 
headerLength, int footerLen
 
   private void rolloverIfNeeded() throws IOException {
     // Roll over if the size is past the threshold
-    if (getCurrentSize() > sizeThreshold) {
-      log.info("CurrentSize {} has reached threshold {}. Rolling over to the 
next version", getCurrentSize(), sizeThreshold);
+    if (getCurrentSize() > getSizeThreshold()) {
+      log.info("CurrentSize {} has reached threshold {}. Rolling over to the 
next version", getCurrentSize(), getSizeThreshold());
       rollOver();
     }
   }
 
   private void rollOver() throws IOException {
     closeStream();
-    this.logFile = logFile.rollOver(rolloverLogWriteToken);
+    this.logFile = getLogFile().rollOver(getLogWriteToken());
     this.closed = false;
   }
 
   private void createNewFile() throws IOException {
-    fileCreationHook.preFileCreation(this.logFile);
-    this.output = new FSDataOutputStream(
-        storage.create(this.logFile.getPath(), false, bufferSize, replication, 
WriterBuilder.DEFAULT_SIZE_THRESHOLD),
-        new FileSystem.Statistics(storage.getScheme())
+    getFileCreationCallback().preFileCreation(this.getLogFile());
+    this.outputStream = new FSDataOutputStream(
+        getStorage().create(
+            this.getLogFile().getPath(),
+            false,
+            getBufferSize(),
+            getReplication(),

Review Comment:
   Good catch, confirmed this was a behavioral change. Restored the fixed 
`DEFAULT_SIZE_THRESHOLD` (512 MB) as the block-size argument to `create()`, 
since the HDFS block size is a separate concept from the log rollover 
threshold. Thanks!
   



-- 
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