By | January 30, 2016

RHive installation configuration on Hortonworks Sandbox

Big Data Analytics – R, rhdfs, rmr2, Rhive – Tutorial 3

In Tutorial 2, we have learned how to install and configure rhdfs, rmr2, in this Tutorial I will explain you the steps for installing rhive in easy way.

Make sure you followed my previous Tutorial 2 in that I have mentioned some prerequisite packages that we need to install first. Once you are done with that follow below tutorial.

Installing Rserve – we need to install Rserve package


Installing Runit – R unit testing package


Note – You may face error like package ‘Rserve’ is not available, to resolve this exit from R console and select different location repository.

Now let’s start Rhive installation

You can directly download it from github - wget

I am going to clone the Rhive repository from github so make sure you have internet access in your sandbox or cluster

Before starting Rhive installation we need to install apache ant (follow below steps)


sudo tar -zxvf apache-ant-1.9.6-bin.tar.gz -C /opt

sudo ln -s /opt/apache-ant-1.9.6 /opt/ant

sudo sh -c 'echo ANT_HOME=/opt/ant >> /etc/environment'

sudo ln -s /opt/ant/bin/ant /usr/bin/ant

ant -version

RHive Installation on Hortonworks Sandbox

Step 1 git clone

Step 2 cd RHive

Step 3 Set Hive and Hadoop home path into environment.

export HADOOP_HOME=/usr/hdp/current/hadoop-client
export HIVE_HOME=/usr/hdp/current/hive-server2

Step 4 ant build

Step 5 R CMD build RHive

Step 6 R CMD INSTALL RHive_2.0-0.10.tar.gz

Step 7 Verify RHive is installed, type R on console and load RJava and RHive library.


Enjoy! In the next tutorial we will focus on writing simple RHive code that is by using R code we will read data from Hive table and will apply standard deviation and mean on specific data.

Keep visiting also like my Facebook fan page for latest updates, Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *