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 https://github.com/nexr/RHive/tarball/master
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
RHive Installation on Hortonworks Sandbox
Step 1 –
git clone https://github.com/nexr/RHive.git
Step 2 –
Step 3 – Set Hive and Hadoop home path into environment.
Step 4 –
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 Toodey.com also like my Facebook fan page for latest updates, Thanks!