org.apache.nutch.scoring.webgraph
Class Loops.Finalizer

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.nutch.scoring.webgraph.Loops.Finalizer
All Implemented Interfaces:
Closeable, Configurable, JobConfigurable, Mapper<Text,Loops.Route,Text,Loops.Route>, Reducer<Text,Loops.Route,Text,Loops.LoopSet>
Enclosing class:
Loops

public static class Loops.Finalizer
extends Configured
implements Mapper<Text,Loops.Route,Text,Loops.Route>, Reducer<Text,Loops.Route,Text,Loops.LoopSet>

Finishes the Loops job by aggregating and collecting and found routes.


Constructor Summary
Loops.Finalizer()
          Default constructor.
Loops.Finalizer(Configuration conf)
          Configurable constructor.
 
Method Summary
 void close()
           
 void configure(JobConf conf)
          Configures the job.
 void map(Text key, Loops.Route value, OutputCollector<Text,Loops.Route> output, Reporter reporter)
          Maps out and found routes, those will be the link cycles.
 void reduce(Text key, Iterator<Loops.Route> values, OutputCollector<Text,Loops.LoopSet> output, Reporter reporter)
          Aggregates all found routes for a given start url into a loopset and collects the loopset.
 
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
 

Constructor Detail

Loops.Finalizer

public Loops.Finalizer()
Default constructor.


Loops.Finalizer

public Loops.Finalizer(Configuration conf)
Configurable constructor.

Method Detail

configure

public void configure(JobConf conf)
Configures the job.

Specified by:
configure in interface JobConfigurable

map

public void map(Text key,
                Loops.Route value,
                OutputCollector<Text,Loops.Route> output,
                Reporter reporter)
         throws IOException
Maps out and found routes, those will be the link cycles.

Specified by:
map in interface Mapper<Text,Loops.Route,Text,Loops.Route>
Throws:
IOException

reduce

public void reduce(Text key,
                   Iterator<Loops.Route> values,
                   OutputCollector<Text,Loops.LoopSet> output,
                   Reporter reporter)
            throws IOException
Aggregates all found routes for a given start url into a loopset and collects the loopset.

Specified by:
reduce in interface Reducer<Text,Loops.Route,Text,Loops.LoopSet>
Throws:
IOException

close

public void close()
Specified by:
close in interface Closeable


Copyright © 2011 The Apache Software Foundation