[
https://issues.apache.org/jira/browse/DRILL-3884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14940630#comment-14940630
]
ASF GitHub Bot commented on DRILL-3884:
---------------------------------------
Github user vkorukanti commented on a diff in the pull request:
https://github.com/apache/drill/pull/185#discussion_r40982402
--- Diff:
contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/HiveScan.java
---
@@ -319,16 +319,12 @@ public ScanStats getScanStats() {
estRowCount = data/1024;
}
- // Hive's native reader is neither memory efficient nor fast. If the
rowcount is below
- // HIVE_SERDE_SCAN_OVERHEAD_FACTOR, make sure it is at least
HIVE_SERDE_SCAN_OVERHEAD_FACTOR to enable the planner
- // to choose HiveDrillNativeParquetScan. Due to the project on top
of HiveDrillNativeParquetScan, we end up
- // choosing the HiveScan instead of HiveDrillNativeParquetScan if
the cost is too low.
- if (estRowCount <= HIVE_SERDE_SCAN_OVERHEAD_FACTOR) {
- estRowCount = HIVE_SERDE_SCAN_OVERHEAD_FACTOR;
- }
+ // Hive's native reader is neither memory efficient nor fast.
Increase the CPU cost
+ // by a factor to let the planner choose HiveDrillNativeScan over
HiveScan with SerDes.
+ float cpuCost = 1 * HIVE_SERDE_SCAN_OVERHEAD_FACTOR;
--- End diff --
Fixed in updated patch.
> Hive native scan has lower parallelization leading to performance degradation
> -----------------------------------------------------------------------------
>
> Key: DRILL-3884
> URL: https://issues.apache.org/jira/browse/DRILL-3884
> Project: Apache Drill
> Issue Type: Bug
> Components: Query Planning & Optimization, Storage - Hive
> Affects Versions: 1.2.0
> Reporter: Venki Korukanti
> Assignee: Venki Korukanti
> Priority: Critical
> Fix For: 1.2.0
>
>
> Currently {{HiveDrillNativeParquetScan.getScanStats()}} divides the rowCount
> got from {{HiveScan}} by a factor and returns that as cost. Problem is all
> cost calculations and parallelization depends on the rowCount. Value
> {{cpuCost}} is not taken into consideration in current cost calculations in
> {{ScanPrel}}. In order for the planner to choose
> {{HiveDrillNativeParquetScan}} over {{HiveScan}}, rowCount has to be lowered
> for the former, but this leads to lower parallelization and performance
> degradation.
> Temporary fix for Drill 1.2 before DRILL-3856 fully resolves considering CPU
> cost in cost model:
> 1. Change ScanPrel to consider the CPU cost in given Stats from GroupScan
> 2. Have higher CPU cost for {{HiveScan}} (SerDe route)
> 3. Lower CPU cost for {{HiveDrillNativeParquetScan}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)