public static class AKMeans.Map extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.BytesWritable>
ByteKMeans
under the
hood. For each feature assign the feature to a centroid and emit with
centroid as key.Constructor and Description |
---|
Map() |
Modifier and Type | Method and Description |
---|---|
protected static void |
loadCluster(org.apache.hadoop.mapreduce.Mapper.Context context) |
void |
map(org.apache.hadoop.io.Text key,
org.apache.hadoop.io.BytesWritable value,
org.apache.hadoop.mapreduce.Mapper.Context context) |
protected void |
setup(org.apache.hadoop.mapreduce.Mapper.Context context) |
public Map()
protected void setup(org.apache.hadoop.mapreduce.Mapper.Context context) throws IOException, InterruptedException
setup
in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.BytesWritable>
IOException
InterruptedException
protected static void loadCluster(org.apache.hadoop.mapreduce.Mapper.Context context) throws IOException
IOException
public void map(org.apache.hadoop.io.Text key, org.apache.hadoop.io.BytesWritable value, org.apache.hadoop.mapreduce.Mapper.Context context) throws IOException, InterruptedException
map
in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.BytesWritable>
IOException
InterruptedException