public class StreamingKMeansReducer extends org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.IntWritable,CentroidWritable,org.apache.hadoop.io.IntWritable,CentroidWritable>
Constructor and Description |
---|
StreamingKMeansReducer() |
Modifier and Type | Method and Description |
---|---|
static List<Centroid> |
centroidWritablesToList(Iterable<CentroidWritable> centroids) |
static Iterable<Vector> |
getBestCentroids(List<Centroid> centroids,
org.apache.hadoop.conf.Configuration conf) |
void |
reduce(org.apache.hadoop.io.IntWritable key,
Iterable<CentroidWritable> centroids,
org.apache.hadoop.mapreduce.Reducer.Context context) |
void |
setup(org.apache.hadoop.mapreduce.Reducer.Context context) |
public void setup(org.apache.hadoop.mapreduce.Reducer.Context context)
setup
in class org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.IntWritable,CentroidWritable,org.apache.hadoop.io.IntWritable,CentroidWritable>
public void reduce(org.apache.hadoop.io.IntWritable key, Iterable<CentroidWritable> centroids, org.apache.hadoop.mapreduce.Reducer.Context context) throws IOException, InterruptedException
reduce
in class org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.IntWritable,CentroidWritable,org.apache.hadoop.io.IntWritable,CentroidWritable>
IOException
InterruptedException
public static List<Centroid> centroidWritablesToList(Iterable<CentroidWritable> centroids)
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.