sqoop --direct报错 Cannot run program "mysqldump": error=2, No such file or directory
程序员文章站
2024-02-19 13:49:52
...
20/03/08 12:37:21 INFO mapreduce.Job: Task Id : attempt_1583633534695_0001_m_000000_1, Status : FAILED
Error: java.io.IOException: Cannot run program "mysqldump": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:485)
at org.apache.sqoop.mapreduce.MySQLDumpMapper.map(MySQLDumpMapper.java:405)
at org.apache.sqoop.mapreduce.MySQLDumpMapper.map(MySQLDumpMapper.java:49)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:146)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:793)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:177)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1893)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:171)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 12 more
解决办法:
- 找到安装有Mysql的节点 在mysql/bin下找到mysqldump
- 传到sqoop节点下sqoop/bin
- 给mysqldump 加X(执行)权限
上一篇: JAVA调用Shell脚本
下一篇: Java调用Shell 脚本
推荐阅读
-
sqoop --direct报错 Cannot run program "mysqldump": error=2, No such file or directory
-
Mac IntelliJ - Cannot run program “docker”: error=2, No such file or directory
-
Cannot run program \"cd\": error=2, No such file or directory
-
Android -Cannot run program "XXX/sdk/tools/emulator": error=2, No such file or directory
-
ProcessBuilder java.io.IOException: Cannot run program error=2, No such file or directory