org.apache.nutch.indexer.field
Class FieldIndexer

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.nutch.indexer.field.FieldIndexer
All Implemented Interfaces:
Closeable, Configurable, JobConfigurable, Mapper<Text,Writable,Text,FieldWritable>, Reducer<Text,FieldWritable,Text,FieldIndexer.LuceneDocumentWrapper>, Tool

public class FieldIndexer
extends Configured
implements Tool, Mapper<Text,Writable,Text,FieldWritable>, Reducer<Text,FieldWritable,Text,FieldIndexer.LuceneDocumentWrapper>


Nested Class Summary
static class FieldIndexer.LuceneDocumentWrapper
           
static class FieldIndexer.OutputFormat
           
 
Field Summary
static String DONE_NAME
           
static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
FieldIndexer()
           
FieldIndexer(Configuration conf)
           
 
Method Summary
 void close()
           
 void configure(JobConf job)
           
 void index(Path[] fields, Path indexDir)
           
static void main(String[] args)
           
 void map(Text key, Writable value, OutputCollector<Text,FieldWritable> output, Reporter reporter)
           
 void reduce(Text key, Iterator<FieldWritable> values, OutputCollector<Text,FieldIndexer.LuceneDocumentWrapper> output, Reporter reporter)
           
 int run(String[] args)
           
 
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
 
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
 

Field Detail

LOG

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

DONE_NAME

public static final String DONE_NAME
See Also:
Constant Field Values
Constructor Detail

FieldIndexer

public FieldIndexer()

FieldIndexer

public FieldIndexer(Configuration conf)
Method Detail

configure

public void configure(JobConf 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,FieldWritable> output,
                Reporter reporter)
         throws IOException
Specified by:
map in interface Mapper<Text,Writable,Text,FieldWritable>
Throws:
IOException

reduce

public void reduce(Text key,
                   Iterator<FieldWritable> values,
                   OutputCollector<Text,FieldIndexer.LuceneDocumentWrapper> output,
                   Reporter reporter)
            throws IOException
Specified by:
reduce in interface Reducer<Text,FieldWritable,Text,FieldIndexer.LuceneDocumentWrapper>
Throws:
IOException

index

public void index(Path[] fields,
                  Path indexDir)
           throws IOException
Throws:
IOException

main

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

run

public int run(String[] args)
        throws Exception
Specified by:
run in interface Tool
Throws:
Exception


Copyright © 2006 The Apache Software Foundation