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

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

public static class LinkDumper.Inverter
extends Object
implements Mapper<Text,Writable,Text,ObjectWritable>, Reducer<Text,ObjectWritable,Text,LinkDumper.LinkNode>

Inverts outlinks from the WebGraph to inlinks and attaches node information.


Constructor Summary
LinkDumper.Inverter()
           
 
Method Summary
 void close()
           
 void configure(JobConf conf)
           
 void map(Text key, Writable value, OutputCollector<Text,ObjectWritable> output, Reporter reporter)
          Wraps all values in ObjectWritables.
 void reduce(Text key, Iterator<ObjectWritable> values, OutputCollector<Text,LinkDumper.LinkNode> output, Reporter reporter)
          Inverts outlinks to inlinks while attaching node information to the outlink.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkDumper.Inverter

public LinkDumper.Inverter()
Method Detail

configure

public void configure(JobConf conf)
Specified by:
configure in interface JobConfigurable

map

public void map(Text key,
                Writable value,
                OutputCollector<Text,ObjectWritable> output,
                Reporter reporter)
         throws IOException
Wraps all values in ObjectWritables.

Specified by:
map in interface Mapper<Text,Writable,Text,ObjectWritable>
Throws:
IOException

reduce

public void reduce(Text key,
                   Iterator<ObjectWritable> values,
                   OutputCollector<Text,LinkDumper.LinkNode> output,
                   Reporter reporter)
            throws IOException
Inverts outlinks to inlinks while attaching node information to the outlink.

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

close

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


Copyright © 2011 The Apache Software Foundation