环境: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目录下