Search This Blog

Step by step guide for execution engines usage in Apache Hive.

In this article, We will learn how to use different execution engines in Apache Hive.

1)  Create a table called employee to run next queries. You can check how to create a table in Hive  here.

 Check available execution engine in hive-site.xml.

grep -C2 -i execution.engine /etc/hive/conf/hive-site.xml

Execution engine defined in hive-site.xml is the default execution engine.The image below shows tez is the execution engine defined in hive-site.xml.

Test the default execution engine.

The image below shows Tez execution engine started by Hive query.

Change execution engine in beeline prompt.

The image below shows mr execution engine set before running query.

set hive.execution.engine=mr;
select count(*) from employee;

Most of the latest Hadoop distributions provide TEZ as their default execution . If you want to chage execution engine  at cluster level, You need to modify hive.execution.engine property value using either Ambari (HDP) or Cloudera Manager (CDH) depending on your hadoop distribution.


We can even check execution engine used by a Hive query from Resource manager user interface.