org.apache.nutch.tools.compat
Class CrawlDbConverter
java.lang.Object
org.apache.hadoop.util.ToolBase
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
Fields inherited from class org.apache.hadoop.util.ToolBase |
conf |
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,
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