Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-4194

Improve the performance of metadata fetch operation in HiveScan

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4.0
    • 1.5.0
    • Storage - Hive
    • None

    Description

      Current HiveScan fetches the InputSplits for all partitions when HiveScan is created. This causes long delays when the table contains large number of partitions. If we end up pruning majority of partitions, this delay is unnecessary.

      We need this InputSplits info from the beginning of planning because

      • it is used in calculating the cost of the HiveScan. Currently when calculating the cost first we look at the rowCount (from Hive MetaStore), if it is available we use it in cost calculation. Otherwise we estimate the rowCount from InputSplits.
      • We also need the InputSplits for determining whether HiveScan is a singleton or distributed for adding appropriate traits in ScanPrule

      Fix is to delay the loading of the InputSplits until we need. There are two cases where we need it. If we end up fetching the InputSplits, store them until the query completes.

      • If the stats are not available, then we need InputSplits
      • If the partition is not pruned we need it for parallelization purposes.

      Regarding getting the parallelization info in ScanPrule: Had a discussion with amansinha100. All we need at this point is whether the data is distributed or singleton at this point. Added a method isSingleton() to GroupScan. Returning false seems to work fine for HiveScan, but I am not sure of the implications here. We also have ExcessiveExchangeIdentifier which removes unnecessary exchanges by looking at the parallelization info. I think it is ok to return the parallelization info here as the pruning must have already completed.

      Attachments

        Activity

          People

            vkorukanti Venki Korukanti
            vkorukanti Venki Korukanti
            Dechang Gu Dechang Gu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: