How to program MapReduce jobs in Hadoop with R

September 13, 2011
By

(This article was first published on Revolutions, and kindly contributed to R-bloggers)

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 his blog: Revolutions.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: , , ,

Comments are closed.