![59d70fe2bafa76af9c71a473fb62e21e.png](https://i-blog.csdnimg.cn/blog_migrate/ec9926059b688948e50862b4edda60b3.jpeg)
环境:hadoop2.6.5
问题:调用java程序报错
Exception in thread “main” java.lang.RuntimeException: java.lang.RuntimeException: 目录不存在:/log/20200624
at com.sxt.etl.mr.ald.AnalyserLogDataRunner.main(AnalyserLogDataRunner.java:39)
Caused by: java.lang.RuntimeException: 目录不存在:/log/20200624
at com.sxt.etl.mr.ald.AnalyserLogDataRunner.setJobInputPaths(AnalyserLogDataRunner.java:138)
at com.sxt.etl.mr.ald.AnalyserLogDataRunner.run(AnalyserLogDataRunner.java:83)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at com.sxt.etl.mr.ald.AnalyserLogDataRunner.main(AnalyserLogDataRunner.java:36)
2020-06-25 10:18:52,116 ERROR [com.sxt.etl.mr.ald.AnalyserLogDataRunner] - 执行日志解析job异常
java.lang.RuntimeException: 目录不存在:/log/20200624
at com.sxt.etl.mr.ald.AnalyserLogDataRunner.setJobInputPaths(AnalyserLogDataRunner.java:138)
at com.sxt.etl.mr.ald.AnalyserLogDataRunner.run(AnalyserLogDataRunner.java:83)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at com.sxt.etl.mr.ald.AnalyserLogDataRunner.main(AnalyserLogDataRunner.java:36)
解决方案:
1)是你本身就没有这个文件
2)如果有这个文件,就是你的hadoop配置文件没有放到resource目录下