org.apache.mahout.clustering.spectral
Class AffinityMatrixInputMapper

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable,DistributedRowMatrix.MatrixEntryWritable>
      extended by org.apache.mahout.clustering.spectral.AffinityMatrixInputMapper

public class AffinityMatrixInputMapper
extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable,DistributedRowMatrix.MatrixEntryWritable>

Handles reading the files representing the affinity matrix. Since the affinity matrix is representative of a graph, each line in all the files should take the form:

i,j,value

where i and j are the ith and j data points in the entire set, and value represents some measurement of their relative absolute magnitudes. This is, simply, a method for representing a graph textually.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
org.apache.hadoop.mapreduce.Mapper.Context
 
Constructor Summary
AffinityMatrixInputMapper()
           
 
Method Summary
protected  void map(org.apache.hadoop.io.LongWritable key, org.apache.hadoop.io.Text value, org.apache.hadoop.mapreduce.Mapper.Context context)
           
 
Methods inherited from class org.apache.hadoop.mapreduce.Mapper
cleanup, run, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AffinityMatrixInputMapper

public AffinityMatrixInputMapper()
Method Detail

map

protected void map(org.apache.hadoop.io.LongWritable key,
                   org.apache.hadoop.io.Text value,
                   org.apache.hadoop.mapreduce.Mapper.Context context)
            throws IOException,
                   InterruptedException
Overrides:
map in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable,DistributedRowMatrix.MatrixEntryWritable>
Throws:
IOException
InterruptedException


Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.