K - The type of the input keysV - The type of the input valuespublic class ClusterMembershipMapper<K,V> extends org.apache.hadoop.mapred.MapReduceBase implements org.apache.hadoop.mapred.Mapper<K,V,ClusterInfo,RecordInfo>
Mapper that maps each input record to its closest cluster center.ClusterInfo instance containing the cluster information and a RecordInfo instance containing the information of the record mapped to the cluster. Mapper in charge of assigning each input record to its closest cluster center.| Constructor and Description |
|---|
ClusterMembershipMapper() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(org.apache.hadoop.mapred.JobConf jobConf) |
void |
map(K key, V value, org.apache.hadoop.mapred.OutputCollector<ClusterInfo,RecordInfo> output, org.apache.hadoop.mapred.Reporter reporter) |
public void configure(org.apache.hadoop.mapred.JobConf jobConf)
configure in interface org.apache.hadoop.mapred.JobConfigurableconfigure in class org.apache.hadoop.mapred.MapReduceBasepublic void map(K key, V value, org.apache.hadoop.mapred.OutputCollector<ClusterInfo,RecordInfo> output, org.apache.hadoop.mapred.Reporter reporter) throws java.io.IOException
map in interface org.apache.hadoop.mapred.Mapper<K,V,ClusterInfo,RecordInfo>java.io.IOExceptionCopyright © 2016 Oracle and/or its affiliates. All Rights Reserved.