How to program MapReduce jobs in Hadoop with R

[This article was first published on Revolutions, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

MapReduce is a powerful programming framework for efficiently processing very large amounts of data stored in the Hadoop distributed filesystem. But while several programming frameworks for Hadoop exist, few are tuned to the needs of data analysts who typically work in the R environment as opposed to general-purpose languages like Java.

That's why the dev team at Revolution Analytics created the RHadoop project, to give R progammers powerful open-source tools to analyze data stored in Hadoop. RHadoop provides a new R package called rmr, whose goals are:

  • To provide map-reduce programmers the easiest, most productive, most elegant way to write map reduce jobs. Programs written using the rmr package may need one-two orders of magnitude less code than Java, while being written in a readable, reusable and extensible language.
  • To give R programmers a way to access the map-reduce programming paradigm and way to work on big data sets in a way that is natural for data analysts working in R.

Together with its companion packages rhdfs and rhbase (for working with HDFS and HBASE datastores, respectively, in R) the rmr package provides a way for data analysts to access massive, fault tolerant parallelism without needing to master distributed programming. By providing an abstraction layer on top of all of the Hadoop implementation details, the rmr package lets the R programmer focus on the data analysis of very large data sets.

If you want to get started with MapReduce programming in R, this tutorial on rmr shows simple equivalents to the R functions lapply and tapply in map-reduce form. It also gives some simplified, but practical examples of doing linear and logistic regression and k-means clustering via map-reduce. For more advanced map-reduce programmers, these pages on efficient rmr techniques and writing composable mapreduce jobs will also be of interest.

The rmr package is available for download from the github repository under the open-source Apache license, and we encourage other Hadoop developers to get involved with the RHadoop project.

Note: As an introduction to the RHadoop, project lead Antonio Piccolbini will join Revolution Analytics CTO David Champagne for a webinar Wednesday, September 21. Register here for a live introduction to the rmr package and how to use it to analyze big data sets within the map-reduce framework.

githib: Revolution Analytics RHadoop Project

To leave a comment for the author, please follow the link and comment on their blog: Revolutions.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)