【问题标题】:Running Mahout using Hadoop FileNotFoundError使用 Hadoop FileNotFoundError 运行 Mahout
【发布时间】:2013-07-11 14:58:33
【问题描述】:

我正在尝试使用 .\bin\hadoop jar path_to_mahout_jar 等运行 Mahout

仅当输入是本地文件时才有效。当我尝试使用 Hadoop 文件系统中的文件时,会出现以下错误:

Exception in thread "main" java.io.FileNotFoundException: input (The system cannot find the file specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:120)
        at org.apache.mahout.classifier.sgd.TrainLogistic.open(TrainLogistic.java:316)
        at org.apache.mahout.classifier.sgd.TrainLogistic.mainToOutput(TrainLogistic.java:75)
        at org.apache.mahout.classifier.sgd.TrainLogistic.main(TrainLogistic.java:64)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:156)

但是,当我查看 HDFS 时,我可以看到该文件。

【问题讨论】:

  • 你如何指定输入?它没有显示。试试hdfs:// URI
  • 我指定了 hdfs://54.186.225.72/data 但它仍然无法使用“hdfs:/”而不是“hdfs://”抛出错误 hdfs:/54.186.225.72/data跨度>

标签: hadoop mahout


【解决方案1】:

这很奇怪,对我来说 mahout 是在 hdfs 的 Director 中寻找文件,要在我的本地文件系统中制作 mahout,我必须提供一个 file:/// URI。 也许您应该按照 Sean 为您的问题建议的那样尝试 hdfs:// URI。

【讨论】:

    【解决方案2】:

    Trainlogistic 算法(以及其他一些分类算法)不能在 HDFS 上运行。

    检查这个link,它说它只能在单台机器上运行。

    祝你好运..!

    【讨论】:

      【解决方案3】:
      猜你喜欢
      • 1970-01-01
      • 2012-07-09
      • 1970-01-01
      • 2014-03-13
      • 2011-06-07
      • 2011-05-03
      • 2016-06-16
      • 2016-02-21
      • 2014-10-12
      相关资源
      最近更新 更多