This article discuses various ways to change the property value of Apache Hive.
1) Changing the property value from Hive prompt or beeline prompt using set command.
This property value only applies for the session. If we quit the prompt, We will lose the property value.
The code below changes execution engine to mr.
2) Change the property value Using hiveconf option.
This property value only applies for the query we are running.
The code below changes execution engine to mr using hiveconf option.
hive -hiveconf hive.execution.engine=mr -e "select count(*) from employee"
3) Modifying configuration files to change property values for entire cluster.
Hive has configuration files hive-site.xml,hive-env.sh,hive-server2.xml and hivemetastore-site.xml. We can modify them if want to change property value permanently.
If you are usin CDH, you can change the property value using Cloudera Manager.
If you are using HDP , You can change the property value using Apache Ambari.
We will learn how to change the property using Apache Ambari.
Click on Hive ---> Click on Config --> enter the property name in the filter box.
The picture below shows we are searching for property hive.execution.engine in Amabri.
Change the property value ----> Click on Save ---> Restart Hive service.
The picture below shows how to change execution engine in Ambari.
The picture below show save button and restart button in Apache Ambari for Hive service.
Once you restart the cluster , Changes will become permanent and in this case all subsequent queries will have MR as their execution engine.