access_time 3 years ago languageEnglish
more_vert

Apache Hive 3.0.0 Installation on Windows 10 Step by Step Guide

visibility 32,708 comment 27
In this article, I’m going to demo how to install Hive 3.0.0 on Windows 10. Before installation of Apache Hive, please ensure you have Hadoop available on your Windows environment. We cannot run Hive without Hadoop.  I recommend to install Hadoop 3.x to work with Hive 3.0.0. There are two ...
info Last modified by Raymond 7 months ago
thumb_up 6

comment Comments

10 months ago link more_vert

Hi Shiv,

If you want to uninstall, you can follow these steps:

  • Use vi command to edit ~/.bashrc file to remove Hive related environment variables.
  • Remove Hive metastore database if you can using an external database.
  • And then remove the Hive home folder from disk.
format_quote

person Shiv Kumar access_time 11 months ago
Re: Apache Hive 3.0.0 Installation on Windows 10 Step by Step Guide

Can you please let us know how to uninstall HIVE USING CYGWIN?

11 months ago link more_vert

Can you please let us know how to uninstall HIVE USING CYGWIN?

2 years ago link more_vert

Can you add the environment variables into bash profile?

vi ~/.bashrc

And then insert the following lines (replace the values to your paths as shown in your screenshot):

export HADOOP_HOME='/cygdrive/f/DataAnalytics/hadoop-3.0.0'
export PATH=$PATH:$HADOOP_HOME/bin
export HIVE_HOME='/cygdrive/f/DataAnalytics/apache-hive-3.0.0-bin'
export PATH=$PATH:$HIVE_HOME/bin
export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$HIVE_HOME/lib/*.jar

Save the file after insert.

It's very hard to debug without access to your environment. 

format_quote

person Praveen access_time 2 years ago
Re: Apache Hive 3.0.0 Installation on Windows 10 Step by Step Guide

Still facing same issue.... 

Tries with derby command. I have shown  the echo path of hive and hadoop in the below screen shot... 

Can you help me in this?


2 years ago link more_vert

Still facing same issue.... 

Tries with derby command. I have shown  the echo path of hive and hadoop in the below screen shot... 

Can you help me in this?


format_quote

person Raymond access_time 2 years ago
Re: Apache Hive 3.0.0 Installation on Windows 10 Step by Step Guide

Hello Praveen,

If you close the cygwin windows and reopen it and then type the following:

echo $HIVE_HOME
echo $HADOOP_HOME

Does that still list all the values?

And also, I noticed you are using mysql as hive metastore, have you configured all the values correctly? If not, I would recommend using derby if you are just installing Hive for learning.  derby is built in however it only supports on session concurrently.  

2 years ago link more_vert

Hello Praveen,

If you close the cygwin windows and reopen it and then type the following:

echo $HIVE_HOME
echo $HADOOP_HOME

Does that still list all the values?

And also, I noticed you are using mysql as hive metastore, have you configured all the values correctly? If not, I would recommend using derby if you are just installing Hive for learning.  derby is built in however it only supports on session concurrently.  

format_quote

person Praveen access_time 2 years ago
Re: Apache Hive 3.0.0 Installation on Windows 10 Step by Step Guide

While I try to execute the below command in cygwin 

$HIVE_HOME/bin/schematool -dbType derby -initSchema

I am facing issues... I have installed hadoop 3.1.0

Can anyone help. Me in this? 

2 years ago link more_vert

While I try to execute the below command in cygwin 

$HIVE_HOME/bin/schematool -dbType derby -initSchema

I am facing issues... I have installed hadoop 3.1.0

Can anyone help. Me in this? 

2 years ago link more_vert
I’m glad it is working. Have fun with your big data journey!
format_quote

person Saikat access_time 2 years ago
Re: Apache Hive 3.0.0 Installation on Windows 10 Step by Step Guide

Hey Raymond,

Thanks a lot brother for your prompt response.

This worked like a charm after amending mapred-site.xml with %HADOOP_HOME%.  I made a mistake using the unix convention of the variable and was trying the same thing with $HADOOP_HOME$.

Successfully inserted data. Cheers!

2 years ago link more_vert

Hey Raymond,

Thanks a lot brother for your prompt response.

This worked like a charm after amending mapred-site.xml with %HADOOP_HOME%.  I made a mistake using the unix convention of the variable and was trying the same thing with $HADOOP_HOME$.

Successfully inserted data. Cheers!

format_quote

person Raymond access_time 2 years ago
Re: Apache Hive 3.0.0 Installation on Windows 10 Step by Step Guide

Thanks for pointing this out. When I first created this article, it is based on Hadoop 3.0.0. If you install Hadoop 3.0.0, you won't get this error. 

I followed the steps again with the following combination:

  • Hadoop 3.2.1 on Windows
  • Hive 3.0.0 on Windows

I could get reproduce the error you encountered. 

To fix this issue, we just need to ensure Map Reduce required libs are in included in JAVA classpath.

So we can change mapred-site.xml file to ensure the following config exists:

	<property> 
		<name>mapreduce.application.classpath</name>
		<value>%HADOOP_HOME%/share/hadoop/mapreduce/*,%HADOOP_HOME%/share/hadoop/mapreduce/lib/*,%HADOOP_HOME%/share/hadoop/common/*,%HADOOP_HOME%/share/hadoop/common/lib/*,%HADOOP_HOME%/share/hadoop/yarn/*,%HADOOP_HOME%/share/hadoop/yarn/lib/*,%HADOOP_HOME%/share/hadoop/hdfs/*,%HADOOP_HOME%/share/hadoop/hdfs/lib/*</value>
	</property>

The INSERT statement should be able to complete now successfully.


Please let me know if you still encounter any errors.

2 years ago link more_vert

Thanks for pointing this out. When I first created this article, it is based on Hadoop 3.0.0. If you install Hadoop 3.0.0, you won't get this error. 

I followed the steps again with the following combination:

  • Hadoop 3.2.1 on Windows
  • Hive 3.0.0 on Windows

I could get reproduce the error you encountered. 

To fix this issue, we just need to ensure Map Reduce required libs are in included in JAVA classpath.

So we can change mapred-site.xml file to ensure the following config exists:

	<property> 
		<name>mapreduce.application.classpath</name>
		<value>%HADOOP_HOME%/share/hadoop/mapreduce/*,%HADOOP_HOME%/share/hadoop/mapreduce/lib/*,%HADOOP_HOME%/share/hadoop/common/*,%HADOOP_HOME%/share/hadoop/common/lib/*,%HADOOP_HOME%/share/hadoop/yarn/*,%HADOOP_HOME%/share/hadoop/yarn/lib/*,%HADOOP_HOME%/share/hadoop/hdfs/*,%HADOOP_HOME%/share/hadoop/hdfs/lib/*</value>
	</property>

The INSERT statement should be able to complete now successfully.


Please let me know if you still encounter any errors.

format_quote

person Saikat access_time 2 years ago
Re: Apache Hive 3.0.0 Installation on Windows 10 Step by Step Guide

Thanks a lot for your response. I actually resolved the issue yesterday by adding the user in the local group policies --> create symbolic links.

But now I got into a new issue where it says not able to find or load mapreduce while I am trying to insert new data into the test table. Relevant screenshots below for your reference.I think this has something to do with mapred-site.xml, but I have actually configured it as per your steps while installing hadoop 3.2.1.


I tried adding the additional parameters in the mapred-site.xml like below, but still no luck. Do we need to configure the mapred-site.xml file with additional parameters to make hive work with it? 


2 years ago link more_vert

Thanks a lot for your response. I actually resolved the issue yesterday by adding the user in the local group policies --> create symbolic links.

But now I got into a new issue where it says not able to find or load mapreduce while I am trying to insert new data into the test table. Relevant screenshots below for your reference.I think this has something to do with mapred-site.xml, but I have actually configured it as per your steps while installing hadoop 3.2.1.


I tried adding the additional parameters in the mapred-site.xml like below, but still no luck. Do we need to configure the mapred-site.xml file with additional parameters to make hive work with it? 


format_quote

person Raymond access_time 2 years ago
Re: Apache Hive 3.0.0 Installation on Windows 10 Step by Step Guide

Can you try starting your Hadoop daemons (HDFS and YARN services) and also Hive services using Command Prompt (Run As Administrator)?

Forum discussions for column Hadoop.

Follow Kontext

Get our latest updates on LinkedIn.

Want to contribute on Kontext to help others?

Learn more