Hive on TEZ memory footprint and Impala stats.
Hello.
We have ORC tables loaded from Hive (Tez) and queried from Impala. Due to their number of partitions, we had to increase the TEZ AM task's heap, and the note https://my.cloudera.com/knowledge/Tez-AMtask-fails-with-OOME-because-of-huge-impala-stats-chunk?id=348603 seems to match our issue
We'd like to reduce the AM memory footprint, but the solution doesn't work in our 7.1.9 and 7.3.1 environments:
* After setting the option in the hive-site.xml, the "impala_intermediate_stats_chunk*" messages are still present in the Hive's plans.
* Setting the option at the session level returns the error "Cannot modify hive.plan.mapwork.serialization.skip.properties at runtime. It is not in the list of params that are allowed to be modified at runtime (state=42000,code=1)".
* https://github.com/apache/hive/pull/2620 shows that the option should be allowed to be set at the session level, as the HIVE-25501 was implemented in the CDP-7.1.7.
After some research we came across the Jira https://issues.apache.org/jira/browse/HIVE-27114, where the option hive.metastore.partitions.parameters.exclude.pattern was introduced. Setting it to 'impala_intermediate_stats_chunk%', does the trick, as the impalachunks* messages no longer appear, but:
* It only seems to work in the 7.3.1 Hive's version, so it doesn't apply to our 7.1.9 installation.
* We're worried about this note, https://issues.apache.org/jira/browse/IMPALA-12743, solved in Impala 4.4, where it seems that Impala would miss partition stats due to Hive's filtering after using the previous option.
We'd like to know:
* What are we doing wrong with the hive.plan.mapwork.serialization.skip.properties option in the CDP 7.1.9 installation ?
* Is it safe to use the hive.metastore.partitions.parameters.exclude.pattern option in CDP 7.3.1 ?
Thanks in advance for your help and time.
Regards.

