hadoop - Nut 1.11错误:…org.apache.hadoop.fs.FileStatus.isDirectory()Z

标签 hadoop cygwin web-crawler nutch

我想用Google新闻之类的Java开发应用程序。
为此,我从头开始,并与Nutch进行基本设置。

我已经完成安装,但是在一个命令中出现错误。

这里是关于技术的简要介绍。我在用

-nutch 1.11
-Cygwin

  • My first command was :

$ bin/nutch

这给了我完美的输出。

  • Then I did URI crawling like :

$ bin/nutch inject crawl/crawldb urls 

哪个创建了crawldb文件夹并爬取给定的URL

  • Now I want to generate segments and which gives me given Error :

$ bin/nutch generate crawl/crawldb crawl/segments

Generator: starting at 2016-04-14 17:30:29
Generator: Selecting best-scoring urls due for fetch.
Generator: filtering: true
Generator: normalizing: true
Generator: Partitioning selected urls for politeness.
Generator: segment: crawl/segments/20160414173032
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.fs.FileStatus.isDirectory()Z
        at org.apache.nutch.util.LockUtil.removeLockFile(LockUtil.java:79)
        at org.apache.nutch.crawl.Generator.generate(Generator.java:637)
        at org.apache.nutch.crawl.Generator.run(Generator.java:743)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.nutch.crawl.Generator.main(Generator.java:699)

我没有问题。 jar 之间是否有不匹配或有任何其他问题...。

最佳答案

您是自己制作坚果还是使用打包版本的?我刚刚 checkout 了Nutch repo的1.11分支并构建了它,执行您的命令将毫无异常(exception)地提供正确的输出。当然,我已经在不是Windows / cygwin的本地系统(OS X)上对此进行了测试,但这应该不是问题。

1.11nutch分支使用的是hadoop 2.4.0,您可以在runtime/local/lib/文件夹中 check out 从Maven存储库中拉出的hadoop版本,并检查hadoop-*文件。

关于hadoop - Nut 1.11错误:…org.apache.hadoop.fs.FileStatus.isDirectory()Z,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36625590/

相关文章:

hadoop - 使用配置单元 sql 批量插入数百万条记录到配置单元?

hadoop - SQOOP 1 无法加载 Sybase 驱动程序 - 无法加载数据库驱动程序类 : com. sybase.jdbc3.jdbc.SybDriver

java - 如何在控制台上抑制 hadoop 生成的日志消息

git - Cygwin SSH连接到BitBucket的问题

php - 我可以在我的网站上提供网站审核工具吗?

python - 如何爬取页面导航涉及动态加载的网站

hadoop - 用 Pig 写 SequenceFile 失败

windows - 如何让 ssh 在 WINDOWS 上从标准输入接收密码

python - 如何在 Windows 中隐藏 Cygwin Python 控制台窗口?

java - 使用网络爬虫抓取网络数据