org.apache.nutch.indexer.field
Class BasicFields.Flipper
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.nutch.indexer.field.BasicFields.Flipper
- All Implemented Interfaces:
- Closeable, Configurable, JobConfigurable, Mapper<Text,Writable,Text,ObjectWritable>, Reducer<Text,ObjectWritable,Text,LinkDatum>
- Enclosing class:
- BasicFields
public static class BasicFields.Flipper
- extends Configured
- implements Mapper<Text,Writable,Text,ObjectWritable>, Reducer<Text,ObjectWritable,Text,LinkDatum>
Runs the first part of redirect logic. Breaks out fields if a page
contains a redirect.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicFields.Flipper
public BasicFields.Flipper()
configure
public void configure(JobConf conf)
- Configures the job.
- Specified by:
configure
in interface JobConfigurable
close
public void close()
- Specified by:
close
in interface Closeable
map
public void map(Text key,
Writable value,
OutputCollector<Text,ObjectWritable> output,
Reporter reporter)
throws IOException
- Breaks out the collection of fields for url and redirects if necessary.
- Specified by:
map
in interface Mapper<Text,Writable,Text,ObjectWritable>
- Throws:
IOException
reduce
public void reduce(Text key,
Iterator<ObjectWritable> values,
OutputCollector<Text,LinkDatum> output,
Reporter reporter)
throws IOException
- Collects redirect and original links for a given url key. This will be
used in the Scorer to handle redirects.
- Specified by:
reduce
in interface Reducer<Text,ObjectWritable,Text,LinkDatum>
- Throws:
IOException
Copyright © 2006 The Apache Software Foundation