亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

hadoop沒有用于方案的文件系統:file

hadoop沒有用于方案的文件系統:file

翻閱古今 2019-11-11 10:29:35
我正在嘗試NaiveBayesClassifer使用hadoop 運行一個簡單的程序,出現此錯誤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我認為是因為罐子,有什么想法嗎?
查看完整描述

3 回答

?
白衣染霜花

TA貢獻1796條經驗 獲得超10個贊

對于使用shade插件的用戶,按照david_p的建議,您可以通過將ServicesResourceTransformer添加到插件配置中來合并陰影jar中的服務:


  <plugin>

    <groupId>org.apache.maven.plugins</groupId>

    <artifactId>maven-shade-plugin</artifactId>

    <version>2.3</version>

    <executions>

      <execution>

        <phase>package</phase>

        <goals>

          <goal>shade</goal>

        </goals>

        <configuration>

          <transformers>

            <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>

          </transformers>

        </configuration>

      </execution>

    </executions>

  </plugin>

這會將所有org.apache.hadoop.fs.FileSystem服務合并到一個文件中


查看完整回答
反對 回復 2019-11-11
  • 3 回答
  • 0 關注
  • 643 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號