Package org.apache.nutch.crawl
Class CrawlDb
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.nutch.util.NutchTool
org.apache.nutch.crawl.CrawlDb
- All Implemented Interfaces:
Configurable,Tool
This class takes the output of the fetcher and updates the crawldb
accordingly.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.apache.nutch.util.NutchTool
currentJob, currentJobNum, numJobs, results, status -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JobcreateJob(Configuration config, Path crawlDb) static voidstatic Pathlock(Configuration job, Path crawlDb, boolean force) static voidintProgrammatic entry point forNutchToolcallers.voidvoidupdate(Path crawlDb, Path[] segments, boolean normalize, boolean filter, boolean additionsAllowed, boolean force) 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
-
CRAWLDB_ADDITIONS_ALLOWED
- See Also:
-
CRAWLDB_PURGE_404
- See Also:
-
CRAWLDB_PURGE_ORPHANS
- See Also:
-
CURRENT_NAME
- See Also:
-
LOCK_NAME
- See Also:
-
-
Constructor Details
-
CrawlDb
public CrawlDb() -
CrawlDb
-
-
Method Details
-
update
public void update(Path crawlDb, Path[] segments, boolean normalize, boolean filter) throws IOException, InterruptedException, ClassNotFoundException -
update
public void update(Path crawlDb, Path[] segments, boolean normalize, boolean filter, boolean additionsAllowed, boolean force) throws IOException, InterruptedException, ClassNotFoundException -
createJob
- Throws:
IOException
-
lock
- Throws:
IOException
-
install
- Throws:
IOException
-
main
- Throws:
Exception
-
run
-
run
Programmatic entry point forNutchToolcallers.- 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
-