Exception in thread "main" java.lang.IllegalArgumentException:解决方法

时间:2014-03-12 04:27:05   收藏:0   阅读:2598

使用fileSystem的delete方法无法删除文件或目录

Exception in thread "main" java.lang.IllegalArgumentException: Wrong FS: hdfs://h1:9000/out, expected: file:///

at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:381)

at org.apache.hadoop.fs.RawLocalFileSystem.pathToFile(RawLocalFileSystem.java:55)

at org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:393)

at org.apache.hadoop.fs.ChecksumFileSystem.delete(ChecksumFileSystem.java:452)

at mapreduce.WordCountApp.main(WordCountApp.java:36)

由于获取fileSystem对象的时候没有传入访问地址导致。

FileSystem fileSystem = FileSystem.get(new URI(INPUT_PATH),conf);

Exception in thread "main" java.lang.IllegalArgumentException:解决方法,布布扣,bubuko.com

原文:http://www.cnblogs.com/luguoyuanf/p/3594435.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!