Perform the following steps to install rhdfs:
- First, you can download rhdfs 1.0.8 from GitHub. You may need to update the link if Revolution Analytics upgrades the version of rhdfs:
$wget --no-check-certificate
https://raw.github.com/RevolutionAnalytics/rhdfs/master/
build/rhdfs_1.0.8.tar.gz
- Next, you can install rhdfs under the command-line mode:
$ sudo HADOOP_CMD=/usr/bin/hadoop R CMD INSTALL
rhdfs_1.0.8.tar.gz
- You can then set up JAVA_HOME. The configuration of JAVA_HOME depends on the installed Java version within the VM:
$ sudo JAVA_HOME=/usr/java/jdk1.7.0_67-cloudera R CMD javareconf
- Last, you can set up the system environment and initialize rhdfs. You may need to update the environment setup if you use a different version of QuickStart VM:
$ R > Sys.setenv(HADOOP_CMD="/usr/bin/hadoop") > Sys.setenv(HADOOP_STREAMING="/usr/lib/hadoop-mapreduce/hadoop
-streaming-2.5.0-cdh5.2.0.jar") > library(rhdfs) > hdfs.init()