Nutch的命令详解(国外英文资料).doc
文本预览下载声明
Nutch的命令详解(国外英文资料)
Keyword: nutch command
Nutch USES a command that can be a single command on a LAN or a step-by-step command of the entire Web. The main commands are as follows:
1. Crawl
Crawl is a nickname for org.apache. Nutch. Crawl. It is a complete command for crawling and indexing processes.
Method of use:
Shell code
The bin/nutch crawl is [-threads] [-threads] [-] [-]
The bin/nutch crawl is [-threads] [-threads] [-] [-]
Parameters:
urlDir : a text file that contains a list of urls. It is an existing folder.
[-dir d ] : Nutch keeps the working directory of the record, by default the value is:. / crawl - [date] which is the current period.
[-threads n ] : the Fetcher thread count overrides the fetcher.thread.fetch value in the default configuration file (by default 10).
[-depth I ] : the depth of the Nutch crawler iteration, the default value is 5.
[-topn num ] : limit the previous N bar records in each iteration, and the default value is Integer. MAX_VALUE.
The configuration file:
Hadoop - default. XML
XML hadoop - site.
Nutch - default. XML
XML nutch - site.
XML crawl - tool.
Other documents:
Crawl - urlfilter. TXT
2. Readdb
The Readdb command is a nickname for the org.apache. Nutch. CrawlDbReader, which returns or exports information from the crawl database (crawldb).
Method of use:
Shell code
Bin/nutch rseaddb crawldb (-stats | - dump out_dir | - url url )
Bin/nutch rseaddb crawldb (-stats | - dump out_dir | - url url )
Parameters:
crawldb : the crawldb directory.
[-stats] : print all the statistics in the console
[-dump out_dir ] : export the crawldb information to the file in the specified folder
[-url url ] : print the statistics for the specified url
Example:
Shell code
$bin/nutch readdb fullindex/crawldb-stats
$bin/nutch readdb fullindex/crawldb-stats
CrawlDb statistics start: fullindex/CrawlDb
The Statistics for CrawlDb: fullindex/CrawlDb
TOTAL urls: 468030
Retry 0:467361
Retry 1:622
Retry 2:32
Retry 3:15
Min score: 0.0
Avg score
显示全部