Exception in thread "main" java.lang.IllegalArgumentException: Wrong FS: hdfs://master:9000/input

在进行将本地文件合并成大文件然后传输到HDFS文件的过程中出现以下问题

log4j:WARN No appenders could be found for logger (org.apache.hadoop.util.Shell).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" java.lang.IllegalArgumentException: Wrong FS: hdfs://master:9000/input, expected: file:///
    at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:646)
    at org.apache.hadoop.fs.RawLocalFileSystem.pathToFile(RawLocalFileSystem.java:82)
    at org.apache.hadoop.fs.RawLocalFileSystem.mkdirsWithOptionalPermission(RawLocalFileSystem.java:513)
    at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:499)
    at org.apache.hadoop.fs.ChecksumFileSystem.mkdirs(ChecksumFileSystem.java:594)
    at org.apache.hadoop.fs.ChecksumFileSystem.create(ChecksumFileSystem.java:448)
    at org.apache.hadoop.fs.ChecksumFileSystem.create(ChecksumFileSystem.java:435)
    at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:909)
    at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:890)
    at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:787)
    at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:776)
    at hdfs.HDFSFileMeger.fileMeger(HDFSFileMeger.java:34)
    at hdfs.HDFSFileMeger.main(HDFSFileMeger.java:56)

解决方法

把hadoop集群上的core-site.xml和hdfs-site.xml放到工程的src目录下即可

你可能感兴趣的:(大数据,大数据)