Hive(19):hive fetch task功能和配置

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

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值