Difference between revisions of "Cholera MapReduce Application"

From CSE231 Wiki
Jump to navigation Jump to search
Line 26: Line 26:
 
=Code To Implement=
 
=Code To Implement=
 
{{CodeToImplement|CholeraApp|getValueRepresentation<br>createMapper<br>createCollector|mapreduce.apps.cholera.studio}}
 
{{CodeToImplement|CholeraApp|getValueRepresentation<br>createMapper<br>createCollector|mapreduce.apps.cholera.studio}}
 +
 +
{{Sequential|public static ValueRepresentation getValueRepresentation()}}
 +
 +
{{Sequential|public static Mapper<CholeraDeath, WaterPump, Number> createMapper()}}
 +
 +
{{Sequential|public static Collector<? extends Number, ?, ? extends Number> createCollector()}}
  
 
=Testing Your Solution=
 
=Testing Your Solution=

Revision as of 20:43, 26 February 2018

John Snow memorial and pub.jpg

Motivation

Epidemiology is the important study of "why certain people are getting ill."

We get a chance to make sense of the data in a relatively open ended studio.

Background

Imagine you are a physician in 1854 London in the midst of a cholera outbreak. Your theory that contaminated water is the cause meets resistance from the medical establishment which holds that it is spread via the air.

Imagine further that your friend Ada has left you access to computing.

Code To Use

class Location

double getDistanceTo( Location other )

class CholeraDeath

Location getLocation()

enum WaterPump

Location getLocation()

class SohoCholeraOutbreak1854

static CholeraDeath[] getDeaths()

Code To Implement

class: CholeraApp.java Java.png
methods: getValueRepresentation
createMapper
createCollector
package: mapreduce.apps.cholera.studio
source folder: student/src/main/java

method: public static ValueRepresentation getValueRepresentation() Sequential.svg (sequential implementation only)

method: public static Mapper<CholeraDeath, WaterPump, Number> createMapper() Sequential.svg (sequential implementation only)

method: public static Collector<? extends Number, ?, ? extends Number> createCollector() Sequential.svg (sequential implementation only)

Testing Your Solution

Visualization

Original map drawn by John Snow
class: CholeraOutbreakVisualizationApp.java VIZ
package: mapreduce.apps.cholera.viz
source folder: student/src//java

CholeraOutbreak.png

Correctness

class: CholeraStudioTestSuite.java Junit.png
package: mapreduce
source folder: testing/src/test/java