Skip to content

PrintUtility forces us to allocate 2g heaps for unit tests #3248

@drewfarris

Description

@drewfarris

In the PrintUtility that is used to print Accumulo table contents in the context of several tests, there's a method named getPrintableValue that will attempt to decode an Accumulo Key and Value using different strategies that are common to Datawave table structures.

I was attempting to use PrintUtility in a new test related to #3173 and consistently encountered out of memory exceptions from L146 in getPrintableValue.

Upon investigation I observed that the HyperLogLogPlus class was falling back to the legacytDecode method. This was always allocating a large byte array because it was attempting to interpret a byte[] that wasn't an encoded hyper log log data structure. The size of the array was larger than 1G, but smaller than 2G.

I was able to work around this issue by increasing the heap size for unit tests from 1G to 2G as seen here. Not a showstopper, but could be worth looking into.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions