public class KMeansHadoopReducer
extends org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.Text,org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
KMEANS_REDUCE_FILE_PREFIX
File prefix for serialized reducers
|
static java.lang.String |
KMEANS_WRITE_PATH
The key in the configuration that the write path for k-means centroids is
associated with
|
| Constructor and Description |
|---|
KMeansHadoopReducer() |
public static final java.lang.String KMEANS_WRITE_PATH
public static final java.lang.String KMEANS_REDUCE_FILE_PREFIX
public void setup(org.apache.hadoop.mapreduce.Reducer.Context context)
throws java.io.IOException
setup in class org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.Text,org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>java.io.IOExceptionpublic void reduce(org.apache.hadoop.io.Text key,
java.lang.Iterable<org.apache.hadoop.io.BytesWritable> values,
org.apache.hadoop.mapreduce.Reducer.Context context)
throws java.io.IOException
reduce in class org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.Text,org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>java.io.IOException