2013-07-12 28 views
0

我尝试使用运行Mahout中。\ BIN \ Hadoop的罐子path_to_mahout_jar等运行Mahout的使用Hadoop FileNotFoundError

它只有当输入是本地文件的工作。当我尝试使用一个文件从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。

+0

你是如何指定输入?它没有被显示。尝试一个'hdfs://'URI –

+0

我指定了hdfs://54.186.225.72/data,但它仍然不能正常工作,抛出错误hdfs:/54.186.225.72/data与“hdfs:/”而不是“hdfs://” –

回答

0

奇怪的是,对于我来说,mahout在hdfs中寻找位于director中的文件,为了在我的本地文件系统中创建mahout,我必须给出一个文件:/// URI。 可能你应该尝试hdfs:// URI,正如肖恩为你的问题所建议的。

0

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

检查此link它说只能在单机上运行。

祝你好运..!