Package org.apache.nutch.crawl
Class DeduplicationJob
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.nutch.util.NutchTool
org.apache.nutch.crawl.DeduplicationJob
- All Implemented Interfaces:
Configurable,Tool
Generic deduplicator which groups fetched URLs with the same digest and marks
all of them as duplicate except the one with the highest score (based on the
score in the crawldb, which is not necessarily the same as the score
indexed). If two (or more) documents have the same score, then the document
with the latest timestamp is kept. If the documents have the same timestamp
then the one with the shortest URL is kept. The documents marked as duplicate
can then be deleted with the command CleaningJob.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classDeduplicationJob.DedupReducer<K extends Writable>static classCombine multiple new entries for a url. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Textprotected static final CharsetFields inherited from class org.apache.nutch.util.NutchTool
currentJob, currentJobNum, numJobs, results, status -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.nutch.util.NutchTool
getProgress, getStatus, killJob, setConf, stopJobMethods inherited from class org.apache.hadoop.conf.Configured
getConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Field Details
-
urlKey
-
DEDUPLICATION_GROUP_MODE
- See Also:
-
DEDUPLICATION_COMPARE_ORDER
- See Also:
-
UTF_8
-
-
Constructor Details
-
DeduplicationJob
public DeduplicationJob()
-
-
Method Details
-
run
- Specified by:
runin interfaceTool- Throws:
IOException
-
main
- Throws:
Exception
-
run
Description copied from class:NutchToolRuns the tool, using a map of arguments. May return results, or null.- Specified by:
runin classNutchTool- Parameters:
args- aMapof arguments to be run with the toolcrawlId- a crawl identifier to associate with the tool invocation- Returns:
- Map results object if tool executes successfully otherwise null
- Throws:
Exception- if there is an error during the tool execution
-