Rajesh Balamohan created HIVE-24368:
---------------------------------------

             Summary: Optimise AcidUtils::getAcidFilesForStats for ACID tables
                 Key: HIVE-24368
                 URL: https://issues.apache.org/jira/browse/HIVE-24368
             Project: Hive
          Issue Type: Improvement
          Components: HiveServer2
            Reporter: Rajesh Balamohan


After insert, hive gathers statistics for ACID table and that becomes expensive 
over time, due to number of delta folders and scanning .

[https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java#L2648]

 
{noformat}
public static List<FileStatus> getAcidFilesForStats(
        Table table, Path dir, Configuration jc, FileSystem fs) throws 
IOException {
      ...
      Directory acidInfo = AcidUtils.getAcidState(fs, dir, jc, idList, null, 
false, hdfsDirSnapshots);
      ...
      ..+ other calls
      ...
      }

 {noformat}
 

Runtime keeps increasing as more deltas are generated. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to