[ 
https://issues.apache.org/jira/browse/HIVE-17257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16330983#comment-16330983
 ] 

Chao Sun commented on HIVE-17257:
---------------------------------

In the latest test run, most test failures are not new except the following 3:
{code:java}
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[auto_sortmerge_join_2]
org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[llap_smb]
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[smb_mapjoin_15]
{code}
Tested locally, and I couldn't reproduce the failures - the output is the same 
whether with or without my patch (and llap_smb generate a different q.out file 
even without the patch).

> 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
>            Priority: Major
>         Attachments: HIVE-17257.0.patch, HIVE-17257.1.patch, 
> HIVE-17257.2.patch, HIVE-17257.3.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
(v7.6.3#76005)

Reply via email to