K
- The type of the input keysV
- The type of the input valuespublic class KMeansMapper<K,V> extends org.apache.hadoop.mapreduce.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 |
---|
KMeansMapper() |
protected void setup(org.apache.hadoop.mapreduce.Mapper.Context context) throws java.io.IOException, java.lang.InterruptedException
setup
in class org.apache.hadoop.mapreduce.Mapper<K,V,ClusterInfo,RecordInfo>
java.io.IOException
java.lang.InterruptedException
protected void map(K key, V value, org.apache.hadoop.mapreduce.Mapper.Context context) throws java.io.IOException, java.lang.InterruptedException
map
in class org.apache.hadoop.mapreduce.Mapper<K,V,ClusterInfo,RecordInfo>
java.io.IOException
java.lang.InterruptedException
Copyright © 2016 Oracle and/or its affiliates. All Rights Reserved.