I get a streaming error code 1 when calling any R package

93 views
Skip to first unread message

fatma elsafoury

unread,
Sep 14, 2015, 11:23:03 AM9/14/15
to RHadoop
Hi,

Hadoop streaming works fine with me when i try examples like wordcount but when i try to call R package 

of any type in the map function i get streaming error code 1. here is the code

Sys.setenv("HADOOP_CMD"="/usr/local/CELLAR/hadoop/2.7.1/bin/hadoop")
Sys.setenv("HADOOP_STREAMING"="/usr/local/Cellar/hadoop/2.7.1/libexec/share/hadoop/tools/lib/hadoop-streaming-2.7.1.jar")
Sys.setenv("HADOOP_HOME="="/usr/local/Cellar/hadoop/2.7.1")

# load librarys
library(rmr2)
library(rhdfs)


# load sample data
data(iris)

# init hdfs
hdfs.init()

# push data to hdfs
iris.dfs <- to.dfs(iris)

# define map function
iris.map <- function(k, v) {
   library(kernlab)
   lssvm(v$Species ~ ., data=v)

  String(x)
}

# rum mar job
iris.svm <- mapreduce(input=iris.dfs, map=iris.map)



Thank you


kumar deepak

unread,
Sep 21, 2015, 9:13:03 AM9/21/15
to RHadoop
what is the error?

Saar Golde

unread,
Sep 21, 2015, 9:23:31 AM9/21/15
to rha...@googlegroups.com
Please follow the debugging steps at: https://github.com/RevolutionAnalytics/RHadoop/wiki/user%3Ermr%3EDebugging-rmr-programs 
If you still run into issues, please include the stdio error logs, since most errors show up as "Error code 1" in the R console. 

--
post: rha...@googlegroups.com ||
unsubscribe: rhadoop+u...@googlegroups.com ||
web: https://groups.google.com/d/forum/rhadoop?hl=en-US
---
You received this message because you are subscribed to the Google Groups "RHadoop" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rhadoop+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages