« Speed up recursion in R 600-fold with Rcpp | Main | Revolution Analytics Fall Webinar Series »

September 13, 2011

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a010534b1db25970b0154355f56d0970c

Listed below are links to weblogs that reference How to program MapReduce jobs in Hadoop with R:

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

This is quite enticing!

Is it compatible with alternaive DFS implementations?

(I guess my question is about rhdfs in particular)

My team uses the DataStax Brisk distribution of Hadoop+Cassandra, which uses a Cassandra CFS implementation of HDFS.

This alternate HDFS implementation makes it tricky to access the DFS from client programs (such as Sqoop, a SQL<->Hadoop bridge)

To connect to a CFS DFS, we configure our client apps like so (in sqoop-site.xml or similar):


fs.cfs.impl = org.apache.cassandra.hadoop.CassandraFileSystem
fs.default.name = cfs://localhot:9160

(XML translated to .properties format for your blog comment system.)

and we drop a jar containing CassandraFileSystem on the client program's CLASSPATH.

Is there a way to configure RHadoop like this to access an alternative DFS implementation?


Dear

Thank you very much for this interesting post. I have installed and tried rmr. It works really fine.
However, I am having some troubles during the execution of fastkmeans on my own data (https://github.com/RevolutionAnalytics/RHadoop/blob/master/rmr/pkg/tests/kmeans.R) on data stored in a data frame type.

For example, if I execute the following lines provided in your code, every think works fine:
input = to.dfs(lapply(1:100, function(i) keyval(NULL, cbind(sample(0:2, recsize, replace = T) + rnorm(recsize, sd = .1),sample(0:3, recsize, replace = T) + rnorm(recsize, sd = .1)))))
kmeans(input, 12, iterations = 5, fast = T)

However, when I try to execute the following line within data stored in HDFS, as follows
kmeans("/tmp/mydata", 12, iterations = 5, fast = T)
I got the error :
Streaming Command Failed!
Error in mr(map = map, reduce = reduce, reduce.on.data.frame = reduce.on.data.frame, :
hadoop streaming failed with error code 256

Could you please give any suggestions that can help me to overcome this problem?

Thank you very much in advance.

Dear Mike B.,
unfortunately we are unable to confirm compatibility with Cassandra CFS. If your team experiments with it, please share the results. Thanks

Dear Clea,
you don't say what's in mydata, neither what columns the data frame had nor how it was saved, so I am going to make a guess, and that is that you have to convert it to the format that works, which is the one you report. This is just an example so it has no ambition to work as a library function that can read from a wide range of input sources and what not. It is just an example and works fine as such. As far as debugging, please follow the guidelines in https://github.com/RevolutionAnalytics/RHadoop/wiki/Debugging-rmr-programs Among other things it will tell you that the console output in distributed mode, which is probably what you shared here, is rarely informative. Thanks

The comments to this entry are closed.


R for the Enterprise

Got comments or suggestions for the blog editor?
Email David Smith.
Follow revodavid on Twitter Follow David on Twitter: @revodavid

Search Revolutions Blog