
Exception in thread “main“ java.lang.RuntimeException: Error while running command to get :解决方法
Exception in thread "main" java.lang.RuntimeException: Error while running command to get file permissions : java.io.IOException: (null) entry in command string: null ls -F +文件路径。看了下报错提示大概是文件路径取读不到。1、
·
错误提示:
Exception in thread "main" java.lang.RuntimeException: Error while running command to get file permissions : java.io.IOException: (null) entry in command string: null ls -F +文件路径
在运行Hadoopapi时遇到以上问题,看了很多解决方法都不能很好的解决。看了下报错提示大概是文件路径取读不到。可以尝试以下两种方案:
1、input文件中的文件只有一个,可以将文件的全路径写上
FileInputFormat.addInputPath(job, new Path("D:\\Dedup\\input\\file1.txt")); FileOutputFormat.setOutputPath(job, new Path("D:\\Dedup\\output"));
2、input文件中的文件有很多,需要全部取读
FileInputFormat.addInputPath(job, new Path("D:\\Dedup\\input/*")); FileOutputFormat.setOutputPath(job, new Path("D:\\Dedup\\output"));
更多推荐
所有评论(0)