hadoop上传本地文件到hdfs报错
public static void Copy() throws IOException{Configuration cfg = new Configuration();FileSystem hdfs = FileSystem.get(cfg);//File file = new File("C:\\XXX\\API\\ss.txt");Path src = new Path("C://XXX/API/ss.txt"); Path dst = new Path("/");hdfs.copyFromLocalFile(src, dst);System.out.println("uploud to "+ cfg.get("fs.default.name"));FileStatus files[] = hdfs.listStatus(dst);for(FileStatus file : files){System.out.println(file.getPath());}}