org.apache.nutch.tools.compat
Class CrawlDbConverter
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.nutch.tools.compat.CrawlDbConverter
- All Implemented Interfaces:
- Closeable, Configurable, JobConfigurable, Mapper<WritableComparable,CrawlDatum,Text,CrawlDatum>, Tool
public class CrawlDbConverter
- extends Configured
- implements Tool, Mapper<WritableComparable,CrawlDatum,Text,CrawlDatum>
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CrawlDbConverter
public CrawlDbConverter()
configure
public void configure(JobConf job)
- Specified by:
configure
in interface JobConfigurable
map
public void map(WritableComparable key,
CrawlDatum value,
OutputCollector<Text,CrawlDatum> output,
Reporter reporter)
throws IOException
- Specified by:
map
in interface Mapper<WritableComparable,CrawlDatum,Text,CrawlDatum>
- 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