You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Peter Vary (JIRA)" <ji...@apache.org> on 2018/10/16 08:24:00 UTC

[jira] [Updated] (HIVE-20509) Plan: fix wasted memory in plans with large partition counts

     [ https://issues.apache.org/jira/browse/HIVE-20509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Vary updated HIVE-20509:
------------------------------
       Resolution: Fixed
    Fix Version/s: 4.0.0
           Status: Resolved  (was: Patch Available)

Pushed to master.
Thanks for the patch [~b.maidics] and for the review [~gopalv]!

> Plan: fix wasted memory in plans with large partition counts
> ------------------------------------------------------------
>
>                 Key: HIVE-20509
>                 URL: https://issues.apache.org/jira/browse/HIVE-20509
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Planning
>            Reporter: Gopal V
>            Assignee: Barnabas Maidics
>            Priority: Minor
>              Labels: newbie
>             Fix For: 4.0.0
>
>         Attachments: HIVE-20509.2.patch, HIVE-20509.patch, after.png, before.png
>
>
> {code}
>   public void addPathToAlias(Path path, String newAlias){
>     ArrayList<String> aliases = pathToAliases.get(path);
>     if (aliases == null) {
>       aliases = new ArrayList<>();
>       StringInternUtils.internUriStringsInPath(path);
>       pathToAliases.put(path, aliases);
>     }
>     aliases.add(newAlias.intern());
>   }
> {code}
> ArrayList::DEFAULT_CAPACITY is 10, so this wastes 500 bytes of memory due to the {{new ArrayList<>();}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)