[
https://issues.apache.org/jira/browse/HADOOP-17905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shilun Fan updated HADOOP-17905:
--------------------------------
Component/s: io
Hadoop Flags: Reviewed
Target Version/s: 3.4.0
Affects Version/s: 3.4.0
> Modify Text.ensureCapacity() to efficiently max out the backing array size
> --------------------------------------------------------------------------
>
> Key: HADOOP-17905
> URL: https://issues.apache.org/jira/browse/HADOOP-17905
> Project: Hadoop Common
> Issue Type: Improvement
> Components: io
> Affects Versions: 3.4.0
> Reporter: Peter Bacsko
> Assignee: Peter Bacsko
> Priority: Major
> Labels: pull-request-available
> Fix For: 3.4.0
>
> Time Spent: 4h 20m
> Remaining Estimate: 0h
>
> This is a continuation of HADOOP-17901.
> Right now we use a factor of 1.5x to increase the byte array if it's full.
> However, if the size reaches a certain point, the increment is only (current
> size + length). This can cause performance issues if the textual data which
> we intend to store is beyond this point.
> Instead, let's max out the array to the maximum. Based on different sources,
> a safe choice seems to be Integer.MAX_VALUE - 8 (see ArrayList,
> AbstractCollection, HashTable, etc).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]