달나라 노트

Hive : hive.execution.engine (hive engine 설정) 본문

SQL/Apache Hive

Hive : hive.execution.engine (hive engine 설정)

CosmosProject 2021. 6. 4. 03:09
728x90
반응형

 

 

 

 

Hive에서는 어떤 engine을 사용할지 설정할 수 있습니다.

 

code template

set hive.execution.engine = mr;
set hive.execution.engine = tez;
set hive.execution.engine = spark;

mr -> mapreduce engine 사용 (default engine)
tez -> tez engine 사용 (Hive 2.0부터는 tez가 default engine)
spark -> spark engine 사용

 

 

Hive 문서를 찾아보면 아래와 같은 내용이 있습니다.

 

hive.execution.engine

  • Default Value: mr (deprecated in Hive 2.0.0 – see below)
  • Added In: Hive 0.13.0 with HIVE-6103 and HIVE-6098

Chooses execution engine. Options are: mr (Map Reduce, default), tez (Tez execution, for Hadoop 2 only), or spark (Spark execution, for Hive 1.1.0 onward).

While mr remains the default engine for historical reasons, it is itself a historical engine and is deprecated in the Hive 2 line (HIVE-12300). It may be removed without further warning.

See Hive on Tez and Hive on Spark for more information, and see the Tez section and the Spark section below for their configuration properties.

 

(Link = https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties)

 

 

 

 

 

또한 AWS에서 Map Reduce와 Tez engine을 비교한 내용이 있는데,

결과만 보자면 Tez가 Map Reduce보다 더 성능이 좋다는 내용입니다.

 

Map Reduce -> 49.699 seconds

Tez -> 30.711 seconds

 

Test를 보면 Tez가 Map Reduce보다 꽤나 좋은 성능을 보여줍니다.

 

Link = https://docs.aws.amazon.com/emr/latest/ReleaseGuide/tez-using.html

 

Map Reduce engine은 실행 중 생성되는 파일들을 local disk에 저장하여 이때의 IO 비용때문에 좀 더 늦지만

Tez는 이런 파일들을 memory에 저장해서 좀 더 높은 속도를 보입니다.

 

 

 

 

 

 

 

728x90
반응형
Comments