Change the hadoop project in eclipse to a workspace, and start the task again

I changed the hadoop project in eclipse to a workspace, and when I started the task again, I found that the following exception was reported:

Java code copy code  Favorite code
  1. java.io.IOException: No FileSystem for scheme: hdfs  
  2.         at org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:2421)  
  3.         at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2428)  
  4.         at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:88)  
  5.         at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2467)  
  6.         at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2449)  
  7.         at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:367)  
  8.         at FileCopyToHdfs.readFromHdfs(FileCopyToHdfs.java:65)  
  9.         at FileCopyToHdfs.main(FileCopyToHdfs.java:26)  
java.io.IOException: No FileSystem for scheme: hdfs
        at org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:2421)
        at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2428)
        at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:88)
        at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2467)
        at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2449)
        at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:367)
        at FileCopyToHdfs.readFromHdfs(FileCopyToHdfs.java:65)
        at FileCopyToHdfs.main(FileCopyToHdfs.java:26)



The reason is generally that the jar package hadoop-hdfs.jar is not imported.



After importing the package, re-compile ant, submit the task, and it runs normally!

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326641572&siteId=291194637