【发布时间】:2013-06-20 08:11:58
【问题描述】:
我正在尝试使用 hadoop 运行一个简单的NaiveBayesClassifer,出现此错误
Exception in thread "main" java.io.IOException: No FileSystem for scheme: file
at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1375)
at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:66)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1390)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:196)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:95)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:180)
at org.apache.hadoop.fs.Path.getFileSystem(Path.java:175)
at org.apache.mahout.classifier.naivebayes.NaiveBayesModel.materialize(NaiveBayesModel.java:100)
代码:
Configuration configuration = new Configuration();
NaiveBayesModel model = NaiveBayesModel.materialize(new Path(modelPath), configuration);// error in this line..
modelPath指向NaiveBayes.bin文件,配置对象正在打印-Configuration: core-default.xml, core-site.xml
我认为是因为罐子,有什么想法吗?
【问题讨论】:
-
需要更多信息...
-
不认识自己,但在 google 上的快速浏览表明存在一些未按照您的建议引用的罐子的问题。也许以下链接会产生答案。 groups.google.com/a/cloudera.org/forum/#!topic/scm-users/…grokbase.com/t/cloudera/cdh-user/134r64jm5t/…
-
我正在将 hadoop-common-2.0.0-cdh4.3.0-sources.jar 和 hadoop-core-0.20.2.jar 添加到类路径中,我先删除了它,它工作不知道为什么。
-
嗯..你能告诉我你的环境吗?另外,请给我看完整的异常信息。
-
modelPath 的值是多少?你试过
file:///path/to/dir