Hadoop2.7.1字数作业

piah890a  于 2021-05-29  发布在  Hadoop
关注(0)|答案(3)|浏览(594)

我安装了hadoop2.7.1并设置了运行在jdk8上的hdfs。试图运行wordcount作业时。我得到以下例外。谢谢你的帮助。
我钻到原木上找到了。

2016-01-02 20:42:17,220 INFO [AsyncDispatcher event handler] org.apache.hadoop.mapreduce.v2.app.job.impl.TaskAttemptImpl: Diagnostics report from attempt_1451788850721_0002_m_000000_3: Exception from container-launch.
Container id: container_1451788850721_0002_01_000010
Exit code: 9009

**Exception message: 'MySQL' is not recognized as an internal or external command**,

operable program or batch file.
'MySQL' is not recognized as an internal or external command,
operable program or batch file.

Stack trace: ExitCodeException exitCode=9009: 'MySQL' is not recognized as an internal or external command,
operable program or batch file.
'MySQL' is not recognized as an internal or external command,
operable program or batch file.

    at org.apache.hadoop.util.Shell.runCommand(Shell.java:545)
    at org.apache.hadoop.util.Shell.run(Shell.java:456)
    at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:722)
    at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:211)
    at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:302)
    at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:82)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

Shell output:         1 file(s) moved.
46scxncf

46scxncf1#

您需要在中更改mysql路径 path 变量以避免空格和一些不常见的符号,如“&”。
我变了

C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5

C:\PROGRA~2\MySQL\MYSQLF~1.5\

C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\Doctrine extensions for PHP

C:\PROGRA~2\MySQL\MYSQLF~1.5\DOCTRI~1\

这解决了我的问题。

xfb7svmp

xfb7svmp2#

mysql未安装或 MYSQL_HOME 未在环境变量中设置。安装mysql或/并设置变量。

8iwquhpp

8iwquhpp3#

外部变量区分大小写,因为“mysql”和“mysql”是不同的。在命令行中键入mysql,查看结果。
注意:导出环境变量和执行的jar必须来自同一个用户。

相关问题