Programming Assignment - Distributed Systems
CSCI/ECEN 5673, University of Colorado at Boulder, Spring 2011
Prof. Rick Han

Due Friday March 4 by 11:55 pm

The students in this class created the following code for their Hadoop programming assignments on Amazon's Elastic Compute Cloud.  We have placed all of the class's code at  Thanks to Amazon for funding these efforts.


The goal of this programming assignment is to enable you to gain experience programming with:

* Amazon Web Services, specifically the EC2 cloud, and S3

* the Hadoop open source framework

* and breaking down a task into a parallel distributed mapreduce model

You may form groups of two to complete this assignment.

Sign up for an account on Amazon Web Services.  Use your Amazon key code for $100 credit.  Redeem it at  Learn about EC2 at

Find a dataset.  There are some publicly available datasets on Amazon at  For example, there's a global weather data set at (20 GB), the 2000 Census, transportation, economics, and Wikipedia page statistics (320 GB).  Wikipedia itself can be obtained at  You don't have to use a complete data set.  Let's say 10-100 MB should be sufficient, though you're welcome to try GB of data.

Install Hadoop on your Amazon instance AMI.  Process this data set using the Hadoop framework on EC2.  See for the source code.  You are not allowed to use Amazon's Elastic MapReduce service.  You will have to install hadoop on your own VM instances.  See an example of how to install Hadoop on AWS at

Calculate the most frequent data item in this data set using Hadoop for a given category, say temperature for the weather data set, or the most popular Wikipedia page.  Sort the data set from most frequent item to least frequent item.  You should use at least 10 instances to perform the mapreduce calculations.  Feel free to vary the # of instances and type of instance to see how the performance varies.  Is it linear across number of instances for a given type?

Here's a mapreduce example   Also see

Store the results persistently in Amazon S3 or another persistent data store.  Visualize the sorted results in a suitable way, so it can be observed that the data items were properly sorted.

Grading: upload a zip file of your source code.  We'll arrange grading meetings in early to mid March to go over the results of your Hadoop implementation on EC2.

Extra Credit: use mapreduce to compute a histogram of your data frequencies.  I think binning would be helpful here.  You may need to have multiple stages of mapreduce, feeding the output of one stage into the input of the next, in order to sort/order the histogram.