org.apache.mahout.graph.linkanalysis
Class PageRankJob

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

public class PageRankJob
extends AbstractJob

Distributed computation of the PageRank a directed graph

This job outputs text files with a vertex id and its pagerank per line.

Command line arguments specific to this class are:

  1. --output=(path): output path
  2. --vertices=(path): file containing the list of vertices of the graph (one per line)
  3. --edges=(path): directory containing edges of the graph (pair of vertex ids per line in textformat)
  4. --numIterations=(Integer): number of numIterations, default: 10
  5. --stayingProbability=(Double): probability not to teleport to a random vertex, default: 0.85

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.


Nested Class Summary
static class RandomWalk.RankPerVertexMapper
           
 
Constructor Summary
PageRankJob()
           
 
Method Summary
protected  void addSpecificOptions()
           
protected  Vector createDampingVector(int numVertices, double stayingProbability)
           
protected  void evaluateSpecificOptions(Map<String,String> parsedArgs)
           
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
 

Constructor Detail

PageRankJob

public PageRankJob()
Method Detail

main

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

createDampingVector

protected Vector createDampingVector(int numVertices,
                                     double stayingProbability)

addSpecificOptions

protected void addSpecificOptions()

evaluateSpecificOptions

protected void evaluateSpecificOptions(Map<String,String> parsedArgs)

run

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


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