public class ClusterCenterReducer extends org.apache.hadoop.mapred.MapReduceBase implements org.apache.hadoop.mapred.Reducer<ClusterInfo,RecordInfo,ClusterInfo,org.apache.hadoop.io.NullWritable>
Reducer
that updates a cluster center based on its members locations, determines if the cluster center converges and emits the updated cluster information.Constructor and Description |
---|
ClusterCenterReducer() |
Modifier and Type | Method and Description |
---|---|
void |
configure(org.apache.hadoop.mapred.JobConf jobConf) |
void |
reduce(ClusterInfo key, java.util.Iterator<RecordInfo> values, org.apache.hadoop.mapred.OutputCollector<ClusterInfo,org.apache.hadoop.io.NullWritable> output, org.apache.hadoop.mapred.Reporter reporter) |
public void configure(org.apache.hadoop.mapred.JobConf jobConf)
configure
in interface org.apache.hadoop.mapred.JobConfigurable
configure
in class org.apache.hadoop.mapred.MapReduceBase
public void reduce(ClusterInfo key, java.util.Iterator<RecordInfo> values, org.apache.hadoop.mapred.OutputCollector<ClusterInfo,org.apache.hadoop.io.NullWritable> output, org.apache.hadoop.mapred.Reporter reporter) throws java.io.IOException
reduce
in interface org.apache.hadoop.mapred.Reducer<ClusterInfo,RecordInfo,ClusterInfo,org.apache.hadoop.io.NullWritable>
java.io.IOException
Copyright © 2016 Oracle and/or its affiliates. All Rights Reserved.