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)

Reply via email to