java - 我的 nutch 重新抓取脚本出了什么问题

标签 java nutch

你好,我正在使用这个脚本重新抓取我的坚果,但它给出了一个异常(exception)..

Indexer: org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory file:/home/hat/crawl/indexes already exists
    at org.apache.hadoop.mapred.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java:111)
    at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:772)
    at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:730)
    at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1249)
    at org.apache.nutch.indexer.Indexer.index(Indexer.java:76)
    at org.apache.nutch.indexer.Indexer.run(Indexer.java:97)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
    at org.apache.nutch.indexer.Indexer.main(Indexer.java:106)

脚本

bin/nutch inject crawl/crawldb urls
bin/nutch generate crawl/crawldb crawl/segments 
s1=`ls -d crawl/segments/2* | tail -1`
echo $s1
bin/nutch fetch $s1 -threads 100 -depth 3 -topN 5
bin/nutch updatedb crawl/crawldb $s1 


bin/nutch invertlinks crawl/linkdb -dir crawl/segments 

bin/nutch index crawl/indexes crawl/crawldb crawl/linkdb crawl/segments/* 

http://wiki.apache.org/nutch/NutchTutorial得到这个

谁能告诉我出了什么问题......

最佳答案

您正在使用同一目录来存储生成的索引,即。抓取/索引。尝试使用不同的或删除旧的。

关于java - 我的 nutch 重新抓取脚本出了什么问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4827600/

相关文章:

web-services - 聚合器是如何构建的?

java - hql 中的 processEqualityExpression() : No expression to process!

java - hibernate 注解,指定列默认值

java - JFileChooser - 自定义文件名(创建新文件)

java - 未知错误 : Unable to build: the file dx. jar 未从 SDK 文件夹加载

hadoop - Nutch抓取深度为='N'的爬行与N次使用深度='1'的循环爬行之间的区别

java - Nutch-Hadoop :- how can we crawl only the updates in the url going for recrawl?

Apache Nutch 步骤说明

java - Spring Tool Suite (STS) 启动错误

solr - 如何通过指定深度来抓取网站