lamber-ken commented on a change in pull request #1317: [HUDI-605] Avoid
calculating the size of schema redundantly
URL: https://github.com/apache/incubator-hudi/pull/1317#discussion_r377731900
##########
File path:
hudi-common/src/main/java/org/apache/hudi/common/util/HoodieRecordSizeEstimator.java
##########
@@ -49,8 +48,9 @@ public long sizeEstimate(HoodieRecord<T> hoodieRecord) {
// note the sizes and differences. A correct estimation in such cases is
handled in
/** {@link ExternalSpillableMap} **/
long sizeOfRecord = ObjectSizeCalculator.getObjectSize(hoodieRecord);
- long sizeOfSchema = ObjectSizeCalculator.getObjectSize(schema);
- LOG.info("SizeOfRecord => " + sizeOfRecord + " SizeOfSchema => " +
sizeOfSchema);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("SizeOfRecord => " + sizeOfRecord + " SizeOfSchema => " +
sizeOfSchema);
+ }
Review comment:
Thanks for reviewing this. Use `LOG.info` will print each time when you put
an element, `LOG.debug` is better.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services