我安装了hadoop 2.7.1并设置了HDFS。。在JDK 8上运行。尝试运行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.
MySQL未安装或环境变量中未设置MYSQL_HOME
。安装MySQL或/并设置变量。
外部变量区分大小写,因为"MySQL"one_answers"MySQL"是不同的。在命令行中键入MySQL,查看结果。
注意:导出环境变量和执行的jar必须来自同一用户。
您需要更改path
变量中的MySQL路径,以避免空格和一些不常见的符号,如"&"
我更改了
C:Program Files (x86)MySQLMySQL Fabric 1.5 & MySQL Utilities 1.5
至
C:PROGRA~2MySQLMYSQLF~1.5
和
C:Program Files (x86)MySQLMySQL Fabric 1.5 & MySQL Utilities 1.5Doctrine extensions for PHP
至
C:PROGRA~2MySQLMYSQLF~1.5DOCTRI~1
这解决了我的问题。