Dear Arshad,

We hope you are  doing good.

You might be receiving this error as the parameters HADOOP_CMD, HADOOP_STREAMING are not set.

To overcome this error,  please issue the below command in R command prompt of terminal.

Command: Sys.setenv(HADOOP_CMD="/path/to/hadoop/bin/hadoop")
Command: Sys.setenv(HADOOP_STREAMING="path/to/hadoop-streaming.jar")

E.g: In my system I have hadoop-1.2.0 installed in /home/user/hadoop-1.2.0 then the commands would be 

Sys.setenv(HADOOP_CMD="/home/user/hadoop-1.2.0/bin/hadoop")
Sys.setenv(HADOOP_STREAMING="/home/user/hadoop-1.2.0/contrib/streaming/hadoop-streaming-1.2.0.jar")

In my system I have hadoop-2.2.0 installed in /usr/lib/hadoop-2.2.0 then the commands would be 

Sys.setenv(HADOOP_CMD="/usr/lib/hadoop-2.2.0/bin/hadoop")
Sys.setenv(HADOOP_STREAMING="/usr/lib/hadoop-2.2.0/share/hadoop/tools/lib/hadoop-streaming-2.2.0.jar")

Based on the version of hadoop installed on your system, set the above parameters in R and then try to run R-Hadoop comands.

If you are still facing the same issue, can you try by running the below simple  MR job in R and check if it is working fine.

Sys.setenv(HADOOP_CMD="$HOME/hadoop-2.2.0/bin/hadoop")
Sys.setenv(HADOOP_STREAMING="$HOME/hadoop-2.2.0/share/hadoop/tools/lib/hadoop-streaming-2.2.0.jar")
library(rmr2)
library(rhdfs)
ints = to.dfs(1:100)
calc = mapreduce(input = ints, map = function(k, v) cbind(v, 2*v))
from.dfs(calc)

Please try it and let me know if this works for you.

Waiting for your response.
 
Please let us know if you need any further help, we will be glad to assist you.

Meanwhile if you feel satisfied with my response kindly leave your feedback by clicking on any one of the below smileys

Please note if you are not happy with the response on this ticket, please escalate it to escalations@edureka.in.
We assure you that we will get back to you within 24 hours