Hive切换计算引擎

1、默认计算引擎mr

set hive.execution.engine=mr;

2、spark计算引擎

set hive.execution.engine=spark;
set spark.executor.cores=2;
set spark.executor.memory=10G;
set spark.executor.instances=10;
set hive.mapred.mode=nonstrict;

3、tez计算引擎

set hive.execution.engine=tez;

注:
--set hive.execution.engine=beeline;
1、在低版本的hive中,只有两种计算引擎【mr, tez】
2、在高版本的hive中,有三种计算引擎【mr, spark, tez】

hive> set hive.execution.engine=beeline;
Query returned non-zero code: 1, cause: 'SET hive.execution.engine=beeline' FAILED in validation : Invalid value.. expects one of [mr, tez, spark].

试跑语句:

select dt,count(*) 
from dwt_trade_return_goods_incr_1d 
where dt>='2019-09-01'
group by dt order by dt;

 

你可能感兴趣的:(Hadoop,#,Hive)