org.apache.nutch.indexer
Class Indexer

java.lang.Object
  extended byorg.apache.hadoop.conf.Configured
      extended byorg.apache.nutch.indexer.Indexer
All Implemented Interfaces:
Closeable, Configurable, JobConfigurable, Reducer

public class Indexer
extends Configured
implements Reducer

Create indexes for segments.


Nested Class Summary
static class Indexer.InputFormat
          Wraps inputs in an ObjectWritable, to permit merging different types in reduce.
static class Indexer.OutputFormat
          Unwrap Lucene Documents created by reduce and add them to an index.
 
Field Summary
static String DONE_NAME
           
static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
Indexer()
           
Indexer(Configuration conf)
          Construct an Indexer.
 
Method Summary
 void close()
           
 void configure(JobConf job)
           
 void index(Path indexDir, Path crawlDb, Path linkDb, Path[] segments)
           
static void main(String[] args)
           
 void reduce(WritableComparable key, Iterator values, OutputCollector output, Reporter reporter)
           
 
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
 

Field Detail

DONE_NAME

public static final String DONE_NAME
See Also:
Constant Field Values

LOG

public static final org.apache.commons.logging.Log LOG
Constructor Detail

Indexer

public Indexer()

Indexer

public Indexer(Configuration conf)
Construct an Indexer.

Method Detail

configure

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

close

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

reduce

public void reduce(WritableComparable key,
                   Iterator values,
                   OutputCollector output,
                   Reporter reporter)
            throws IOException
Specified by:
reduce in interface Reducer
Throws:
IOException

index

public void index(Path indexDir,
                  Path crawlDb,
                  Path linkDb,
                  Path[] segments)
           throws IOException
Throws:
IOException

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 2006 The Apache Software Foundation