I ve a Drill query on 14 tables in Hive. The query took a few seconds to execute. However, the query would stay in "Starting" state for 10+ minutes before execution.
I set up the log to "Debug" mode to figure out what Drill had been doing during the 10+ minutes, only to find out Drill generated excessive number of meta data queries to hive meta store.
Although each query took a few micro seconds (meta data cached in memory), the number of queries was 3438793.
drillbit.log:2017-06-05 18:50:57,201 [26ca5bda-5e87-475a-cd93-17c6957cc3ee:foreman] DEBUG o.a.d.e.s.hive.HiveMetadataProvider
- Took 4 µs to get stats from idm_intel_1x.lu_jde_emp_directory
drillbit.log:2017-06-05 18:50:57,201 [26ca5bda-5e87-475a-cd93-17c6957cc3ee:foreman] DEBUG o.a.drill.exec.store.hive.HiveScan
- HiveStats: numRows: 15, sizeInBytes: 15
I can't explain why Drill need to query meta data for the 14 tables for 3.5 million times. Any help is appreciated.