danny0405 commented on code in PR #9013:
URL: https://github.com/apache/hudi/pull/9013#discussion_r1236433342
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/commit/UpsertPartitioner.java:
##########
@@ -384,7 +377,7 @@ protected static long averageBytesPerRecord(HoodieTimeline
commitTimeline, Hoodi
.fromBytes(commitTimeline.getInstantDetails(instant).get(),
HoodieCommitMetadata.class);
long totalBytesWritten = commitMetadata.fetchTotalBytesWritten();
long totalRecordsWritten = commitMetadata.fetchTotalRecordsWritten();
- if (totalBytesWritten > fileSizeThreshold && totalRecordsWritten >
0) {
+ if (totalBytesWritten > fileSizeThreshold && totalBytesWritten <=
fileSizeUpper && totalRecordsWritten > 0) {
avgSize = (long) Math.ceil((1.0 * totalBytesWritten) /
totalRecordsWritten);
break;
Review Comment:
But the `totalBytesWritten` is the size accumulated from all the written
files, what the meaning of it to compare with a single file size threshold?
--
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]