org.apache.nutch.scoring.webgraph
Class LinkDumper.Merger

java.lang.Object
  extended by org.apache.nutch.scoring.webgraph.LinkDumper.Merger
All Implemented Interfaces:
Closeable, JobConfigurable, Reducer<Text,LinkDumper.LinkNode,Text,LinkDumper.LinkNodes>
Enclosing class:
LinkDumper

public static class LinkDumper.Merger
extends Object
implements Reducer<Text,LinkDumper.LinkNode,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
LinkDumper.Merger()
           
 
Method Summary
 void close()
           
 void configure(JobConf conf)
           
 void reduce(Text key, Iterator<LinkDumper.LinkNode> values, OutputCollector<Text,LinkDumper.LinkNodes> output, 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(JobConf conf)
Specified by:
configure in interface JobConfigurable

reduce

public void reduce(Text key,
                   Iterator<LinkDumper.LinkNode> values,
                   OutputCollector<Text,LinkDumper.LinkNodes> output,
                   Reporter reporter)
            throws IOException
Aggregate all LinkNode objects for a given url.

Specified by:
reduce in interface Reducer<Text,LinkDumper.LinkNode,Text,LinkDumper.LinkNodes>
Throws:
IOException

close

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


Copyright © 2012 The Apache Software Foundation