nutch源代码分析--index(一)

package org.apache.nutch.indexer;
1。static OutputFormat
类用来初始化lucene对象并设置lucene各个参数。各个参数从JobConf  job参数中获取。
2. public void reduce(WritableComparable key, Iterator values, OutputCollector output, Reporter reporter)
对iterator中的数据进行循环,判断当前的数据是否是Inlinks、CrawlDatum,结果将segment和digest,boost加权字段加入索引。
3. public void index
初始化JobConf类对象并设置各种参数。
4. public int run(String[] args)
判断输入的参数是否是四个,含义是<index> <crawldb> <linkdb> <segment>,然后调用index函数

你可能感兴趣的:(String,Lucene,iterator,output,代码分析)