I recently installed CDH5.1.0 along with R 3.1.*, and I got rmr2, rJava, and rhdfs all installed properly. (along with the required packages and set the required environment variables) After some trouble with installing rhdfs I add this to my /usr/lib/R/etc/Renviron.site file:
HADOOP_HOME="usr/lib/hadoop"
HADOOP_CMD="usr/bin/hadoop"
HADOOP_STREAMING="usr/lib/hadoop-mapreduce/hadoop-streaming-2.3.0-cdh5.1.0.jar"
Then I started R and ran the following code:
>library(rmr2)
loading required packages ...
>library(rJava)
>library(rhdfs)
HADOOP_CMD=usr/bin/hadoop
be sure to run hdfs.init()
>hdfs.init()
sh: 1: usr/bin/hadoop: not found
Error in system(command, intern = TRUE) : error in running command
I have seen similar problems with java class path, but I haven't found this specific problem anywhere else on the internet! Any help would be much appreciated.