org.apache.mahout.graph
Class AdjacencyMatrixJob

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.mahout.common.AbstractJob
          extended by org.apache.mahout.graph.AdjacencyMatrixJob
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

public class AdjacencyMatrixJob
extends AbstractJob

Distributed computation of the adjacency matrix of a graph, see http://en.wikipedia.org/wiki/Adjacency_matrix

This job outputs SequenceFiles an IntWritable as key and a VectorWritable as value

Command line arguments specific to this class are:

  1. --output=(path): output path where the resulting matrix and the number of vertices should be written
  2. --vertices=(path): file containing a list of all vertices
  3. --edges=(path): Directory containing edges of the graph
  4. --symmetric = (boolean) produce a symmetric adjacency matrix (corresponds to an undirected graph)

General command line options are documented in AbstractJob.

Note that because of how Hadoop parses arguments, all "-D" arguments must appear before all other arguments.


Field Summary
static String ADJACENCY_MATRIX
           
static String NUM_VERTICES
           
static String VERTEX_INDEX
           
 
Constructor Summary
AdjacencyMatrixJob()
           
 
Method Summary
static void main(String[] args)
           
 int run(String[] args)
           
 
Methods inherited from class org.apache.mahout.common.AbstractJob
addFlag, addInputOption, addOption, addOption, addOption, addOption, addOutputOption, buildOption, getAnalyzerClassFromOption, getCLIOption, getCombinedTempPath, getGroup, getInputPath, getOption, getOption, getOutputPath, getOutputPath, getTempPath, getTempPath, hasOption, keyFor, maybePut, parseArguments, parseDirectories, prepareJob, prepareJob, prepareJob, setS3SafeCombinedInputPath, shouldRunNextPhase
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
 

Field Detail

NUM_VERTICES

public static final String NUM_VERTICES
See Also:
Constant Field Values

ADJACENCY_MATRIX

public static final String ADJACENCY_MATRIX
See Also:
Constant Field Values

VERTEX_INDEX

public static final String VERTEX_INDEX
See Also:
Constant Field Values
Constructor Detail

AdjacencyMatrixJob

public AdjacencyMatrixJob()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

run

public int run(String[] args)
        throws Exception
Throws:
Exception


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.