You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "Manoj Govindassamy (Jira)" <ji...@apache.org> on 2021/11/09 18:29:00 UTC

[jira] [Created] (HUDI-2718) ExternalSpillableMap throws ArithmeticException when estimating the size of the payload

Manoj Govindassamy created HUDI-2718:
----------------------------------------

             Summary: 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
             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)