[TOC]

org.apache.nutch.scoring.webgraph

Class Loops.Finalizer

  • java.lang.Object
    • org.apache.hadoop.conf.Configured
    • org.apache.nutch.scoring.webgraph.Loops.Finalizer
    • All Implemented Interfaces:
    • Closeable, AutoCloseable, org.apache.hadoop.conf.Configurable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Mapper, org.apache.hadoop.mapred.Reducer
    • Enclosing class:
    • Loops

public static class Loops.Finalizer
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.Text,Loops.Route,org.apache.hadoop.io.Text,Loops.Route>, org.apache.hadoop.mapred.Reducer<org.apache.hadoop.io.Text,Loops.Route,org.apache.hadoop.io.Text,Loops.LoopSet>

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

Constructor Summary

Constructors Constructor and Description Loops.Finalizer() Default constructor. Loops.Finalizer(org.apache.hadoop.conf.Configuration conf) Configurable constructor.

Method Summary

Methods Modifier and Type Method and Description void close() void configure(org.apache.hadoop.mapred.JobConf conf) Configures the job. void map(org.apache.hadoop.io.Text key, Loops.Route value, org.apache.hadoop.mapred.OutputCollector output, org.apache.hadoop.mapred.Reporter reporter) Maps out and found routes, those will be the link cycles. void reduce(org.apache.hadoop.io.Text key, Iterator values, org.apache.hadoop.mapred.OutputCollector output, org.apache.hadoop.mapred.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(org.apache.hadoop.conf.Configuration conf)

Configurable constructor.

Method Detail

-  

configure

public void configure(org.apache.hadoop.mapred.JobConf conf)

Configures the job.

  - Specified by: 
  - <code>configure</code> in interface <code>org.apache.hadoop.mapred.JobConfigurable</code>        
-  

map

public void map(org.apache.hadoop.io.Text key,
       Loops.Route value,
       org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.Text,Loops.Route> output,
       org.apache.hadoop.mapred.Reporter reporter)
         throws IOException

Maps out and found routes, those will be the link cycles.

  - Specified by: 
  - <code>map</code> in interface <code>org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.text,loops.route,org.apache.hadoop.io.text,loops.route></org.apache.hadoop.io.text,loops.route,org.apache.hadoop.io.text,loops.route></code> 
  - Throws: 
  - <code>IOException</code>       
-  

reduce

public void reduce(org.apache.hadoop.io.Text key,
          Iterator<Loops.Route> values,
          org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.Text,Loops.LoopSet> output,
          org.apache.hadoop.mapred.Reporter reporter)
            throws IOException

Aggregates all found routes for a given start url into a loopset and collects the loopset.

  - Specified by: 
  - <code>reduce</code> in interface <code>org.apache.hadoop.mapred.Reducer<org.apache.hadoop.io.text,loops.route,org.apache.hadoop.io.text,loops.loopset></org.apache.hadoop.io.text,loops.route,org.apache.hadoop.io.text,loops.loopset></code> 
  - Throws: 
  - <code>IOException</code>       
-  

close

public void close()
  - Specified by: 
  - <code>close</code> in interface <code>Closeable</code> 
  - Specified by: 
  - <code>close</code> in interface <code>AutoCloseable</code>       

Copyright © 2014 The Apache Software Foundation