[TOC]

org.apache.nutch.scoring.webgraph

Class LinkDumper.Merger


public static class LinkDumper.Merger
extends Object
implements org.apache.hadoop.mapred.Reducer<org.apache.hadoop.io.Text,LinkDumper.LinkNode,org.apache.hadoop.io.Text,LinkDumper.LinkNodes>

Merges LinkNode objects into a single array value per url. This allows all values to be quickly retrieved and printed via the Reader tool.

Constructor Summary

Constructors Constructor and Description LinkDumper.Merger()

Method Summary

Methods Modifier and Type Method and Description void close() void configure(org.apache.hadoop.mapred.JobConf conf) void reduce(org.apache.hadoop.io.Text key, Iterator values, org.apache.hadoop.mapred.OutputCollector output, org.apache.hadoop.mapred.Reporter reporter) Aggregate all LinkNode objects for a given url.

-    

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

-  

LinkDumper.Merger

public LinkDumper.Merger()

Method Detail

-  

configure

public void configure(org.apache.hadoop.mapred.JobConf conf)
  - Specified by: 
  - <code>configure</code> in interface <code>org.apache.hadoop.mapred.JobConfigurable</code>        
-  

reduce

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

Aggregate all LinkNode objects for a given url.

  - Specified by: 
  - <code>reduce</code> in interface <code>org.apache.hadoop.mapred.Reducer<org.apache.hadoop.io.text,linkdumper.linknode,org.apache.hadoop.io.text,linkdumper.linknodes></org.apache.hadoop.io.text,linkdumper.linknode,org.apache.hadoop.io.text,linkdumper.linknodes></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