在windonws下eclipse连接 linux上的hadoop出现如下错误
主要代码如下
String src=new String("/user/root/input/helloworld");
String dst=new String("/home/maning/test/helloworld.txt");
hdfs.copyToLocalFile(false, new Path(src),new Path(dst));
错误如下:
java.io.IOException:
Mkdirs failed to create[
/home/maning/test
at org.apache.hadoop.fs.ChecksumFileSystem.create(ChecksumFileSystem.java:378)
at org.apache.hadoop.fs.ChecksumFileSystem.create(ChecksumFileSystem.java:364)
at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:555)
at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:536)
at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:443)
at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:229)
at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:163)
at org.apache.hadoop.fs.FileSystem.copyToLocalFile(FileSystem.java:1222)
at mang.hadoop.test.TestDownloadFile.getFromHdfs(TestDownloadFile.java:50)
at mang.hadoop.test.TestDownloadFile.main(TestDownloadFile.java:40)