1.目的
有的hivesql语句跑mapreduce有的不跑mapreduce,这个设置的目的就是为了,尽量避免跑。
2.配置hive-site.xml
<property>
<name>hive.fetch.task.conversion</name>
<value>more</value>
<description>
Expects one of [none, minimal, more].
Some select queries can be converted to single FETCH task minimizing latency.
Currently the query should be single sourced not having any subquery and should not have
any aggregations or distincts (which incurs RS), lateral views and joins.
0. none : disable hive.fetch.task.conversion
1. minimal : SELECT STAR, FILTER on partition columns, LIMIT only
2. more : SELECT, FILTER, LIMIT only (support TABLESAMPLE and virtual columns)
</description>
</property>
备注:设置成none,就全部都跑mapreduce

本文介绍如何通过配置hive-site.xml中的hive.fetch.task.conversion参数来优化Hive SQL执行,减少不必要的MapReduce任务,提高查询效率。设置为'more'可以支持更多类型的查询转换为FETCH任务,如SELECT、FILTER和LIMIT操作。
1947

被折叠的 条评论
为什么被折叠?



