[
https://issues.apache.org/jira/browse/HUDI-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HUDI-2718:
---------------------------------
Labels: pull-request-available (was: )
> ExternalSpillableMap throws ArithmeticException when estimating the size of
> the payload
> ---------------------------------------------------------------------------------------
>
> Key: HUDI-2718
> URL: https://issues.apache.org/jira/browse/HUDI-2718
> Project: Apache Hudi
> Issue Type: Bug
> Reporter: Manoj Govindassamy
> Assignee: Manoj Govindassamy
> Priority: Blocker
> Labels: pull-request-available
> Fix For: 0.10.0
>
>
> When estimating the size of the payload, ExternalSpillableMap uses the
> current in-memory map size, which could be zero and leading to Divide by Zero
> error which in turn throws the ArithmeticException and crashing the callers.
> {noformat}
> long totalMapSize = ObjectSizeCalculator.getObjectSize(inMemoryMap);
> this.currentInMemoryMapSize = totalMapSize;
> this.estimatedPayloadSize = totalMapSize / inMemoryMap.size();
> shouldEstimatePayloadSize = false;
> LOG.info("New Estimated Payload size => " +
> this.estimatedPayloadSize);{noformat}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)