package clusterassign;

import java.io.IOException;

import org.apache.hadoop.mapreduce.Reducer;

import datapoint.DataPoint;

/**
  * Reducer class for the Cluster Assign step
  */
public class ClusterAssignReducer extends Reducer<DataPoint, DataPoint, DataPoint, DataPoint>
{
	/**
	  * Overridden reduce method of the Reduce class
	  * Parameters:	DataPoint key, a k-Means Centroid
	  * 			Iterable<DataPoint> value, A list of Data Points associated to this Centriod
	  *				Context context
	  * Returns:	(key, value) pairs where
	  *				key is a k-Means Centroid associated with the current Data Point
	  *				value is one of the Data Points in the Iterable list
	  * 
	  * The function receives a (key, value) pair.
	  * For every point in the Iterable list, it outputs the pair (k_Means Centroid, Data Point).
	  */
	@Override
	public void reduce(DataPoint key, Iterable<DataPoint> values, Context context)
		throws IOException, InterruptedException
	{
		for(DataPoint dataPoint : values)
			context.write(key, dataPoint);
	}
}

@@ -5,21 +5,14 @@
 age 
-clusterassign
+source
 ;%0A%0Ai
@@ -117,63 +117,9 @@
 t;%0A%0A
-/**%0A  * Reducer class for the Cluster Assign step%0A  */
 %0A
+
 publ
@@ -214,550 +214,9 @@
 %3E%0A%7B%0A
+
 %09
-/**%0A%09  * Overridden reduce method of the Reduce class%0A%09  * Parameters:%09DataPoint key, a k-Means Centroid%0A%09  * %09%09%09Iterable%3CDataPoint%3E value, A list of Data Points associated to this Centriod%0A%09  *%09%09%09%09Context context%0A%09  * Returns:%09(key, value) pairs where%0A%09  *%09%09%09%09key is a k-Means Centroid associated with the current Data Point%0A%09  *%09%09%09%09value is one of the Data Points in the Iterable list%0A%09  * %0A%09  * The function receives a (key, value) pair.%0A%09  * For every point in the Iterable list, it outputs the pair (k_Means Centroid, Data Point).%0A%09  */
 %0A%09@O

Update ClusterAssignReducer.java