org.apache.nutch.tools.compat
Class CrawlDbConverter

java.lang.Object
  extended by org.apache.hadoop.util.ToolBase
      extended by org.apache.nutch.tools.compat.CrawlDbConverter
All Implemented Interfaces:
Configurable, Closeable, JobConfigurable, Mapper, Tool

public class CrawlDbConverter
extends ToolBase
implements Mapper

This tool converts CrawlDb created in old <UTF8, CrawlDatum> format (Nutch versions < 0.9.0) to the new <Text, CrawlDatum> format. Optionally CrawlDatum.metaData can be converted too from using UTF8 keys to using Text keys.

Author:
Andrzej Bialecki

Field Summary
 
Fields inherited from class org.apache.hadoop.util.ToolBase
conf
 
Constructor Summary
CrawlDbConverter()
           
 
Method Summary
 void close()
           
 void configure(JobConf job)
           
static void main(String[] args)
           
 void map(WritableComparable key, Writable value, OutputCollector output, Reporter reporter)
           
 int run(String[] args)
           
 
Methods inherited from class org.apache.hadoop.util.ToolBase
doMain, getConf, setConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CrawlDbConverter

public CrawlDbConverter()
Method Detail

configure

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

map

public void map(WritableComparable key,
                Writable value,
                OutputCollector output,
                Reporter reporter)
         throws IOException
Specified by:
map in interface Mapper
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException

main

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

run

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


Copyright © 2006 The Apache Software Foundation