hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chao Sun (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-17257) Hive should merge empty files
Date Tue, 08 Aug 2017 23:30:00 GMT

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

Chao Sun updated HIVE-17257:
----------------------------
    Attachment: HIVE-17257.1.patch

Submitting patch v1 for testing (it is not ready yet).

> Hive should merge empty files
> -----------------------------
>
>                 Key: HIVE-17257
>                 URL: https://issues.apache.org/jira/browse/HIVE-17257
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Chao Sun
>            Assignee: Chao Sun
>         Attachments: HIVE-17257.0.patch, HIVE-17257.1.patch
>
>
> Currently if merging file option is turned on and the dest dir contains large number
of empty files, Hive will not trigger merge task:
> {code}
>   private long getMergeSize(FileSystem inpFs, Path dirPath, long avgSize) {
>     AverageSize averageSize = getAverageSize(inpFs, dirPath);
>     if (averageSize.getTotalSize() <= 0) {
>       return -1;
>     }
>     if (averageSize.getNumFiles() <= 1) {
>       return -1;
>     }
>     if (averageSize.getTotalSize()/averageSize.getNumFiles() < avgSize) {
>       return averageSize.getTotalSize();
>     }
>     return -1;
>   }
> {code}
> This logic doesn't seem right as the it seems better to combine these empty files into
one.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message