1. 程式人生 > >Hive(19):hive fetch task功能和配置

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

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