ItGo.me - 专注IT技术分享

首页 > Exception > Hadoop HDFS Wrong FS: hdfs:/ expected file:///的解决方法

Hadoop HDFS Wrong FS: hdfs:/ expected file:///的解决方法

时间:2015-03-01来源:网友分享 点击:
在eclipse编写hadoop程序并运行时,会出现Hadoop HDFS Wrong FS: hdfs:/ expected file:///的错误

Exception in thread "main" java.lang.IllegalArgumentException: Wrong FS: hdfs://192.168.0.22:49000/tmp/mahout-work-hadoop/product-kmeans/clusteredPoints/part-m-00000, expected: file:///
    at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:390)
    at org.apache.hadoop.fs.RawLocalFileSystem.pathToFile(RawLocalFileSystem.java:55)
    at org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:398)
    at org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:255)
    at org.apache.hadoop.fs.FileSystem.getLength(FileSystem.java:816)
    at org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:1479)
    at org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:1474)
        
    
    解决方法 1:
        通过Configuration中的conf.set来设置fs.default.name为core-site.xml中的对应的内容,即
       // conf.set("mapred.jop.tracker", "hdfs://192.168.0.22:49001");
        conf.set("fs.default.name", "hdfs://192.168.0.22:49000");
    解决方法 2:?
        conf.addResource(new Path("/home/hadoop/hadoop-1.2.1/conf/core-site.xml"));
    解决方法 3:
        把hadoop集群上的core-site.xml和hdfs-site.xml放到工程的src目录下

安装hadoop-eclipse-plugin插件出现的问题:Unsupported major.minor version 51.0

安装hadoop-eclipse-plugin插件出现的问题: org/apache/hadoop/eclipse/preferences/MapReducePreferencePage : Unsupported major.minor version 51.0...

Make sure you're using Spring 3.2.5 or better spring-data-solr解决

Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: AnnotationConfigUtils.processCommonDefinitionAnnotations(…) is not public! Make sure you're using Spring 3.2.5 or better...

fetcher caught:java.io.IOException: Spill failed原因

fetcher caught:java.io.IOException: Spill failed...

在eclipse编写hadoop程序并运行时,会出现Hadoop HDFS Wrong FS: hdfs:/ expected file:///的错误 Exception in thread main java.lang.IllegalArgumentException: Wrong FS: hdfs://192.168.0.22:49000/tmp/mahout-work-hadoop/product-kmeans/clustere
------分隔线----------------------------