问题描述
我是Hadoop的新手,正在尝试让第一个简单的“字数统计”示例运行。 我遇到了与此处报告的问题相同的问题(但那里的响应无法解决问题): Could not run jar file in hadoop3.1.3
Java已安装到c:\ jdk-15,并且已正确配置到hadoop-env.cmd文件中,如下所示:
@rem The java implementation to use. required.
set JAVA_HOME=c:\jdk-15
从下面的完整命令提示符转储中可以看到,我收到以下错误。 如果有人能猜出这里有什么问题或有其他建议,我将不胜感激。
“启动容器” [2020-09-30 15:17:56.848]容器退出,退出代码为非零1. stderr的后4096个字节: 无法将““ C:\ jdk-15”“识别为内部或外部命令, 可操作的程序或批处理文件。
PS C:\hadoop-3.2.1\bin> hadoop jar ..\..\Hadoop\WordCount\wc.jar WordCount /test /WordCount/run1
2020-09-30 15:17:51,675 INFO client.RMProxy: Connecting to ResourceManager at /0.0.0.0:8032
2020-09-30 15:17:51,979 WARN mapreduce.JobResourceUploader: Hadoop command-line option parsing not performed. Implement the Tool interface and execute your application with ToolRunner to remedy this.
2020-09-30 15:17:52,052 INFO mapreduce.JobResourceUploader: disabling Erasure Coding for path: /tmp/hadoop-yarn/staging/Admin/.staging/job_1601461031349_0008
2020-09-30 15:17:52,259 INFO sasl.SaslDataTransferClient: SASL encryption trust check: localHostTrusted = false,remoteHostTrusted = false
2020-09-30 15:17:52,426 INFO input.FileInputFormat: Total input files to process : 3
2020-09-30 15:17:52,592 INFO sasl.SaslDataTransferClient: SASL encryption trust check: localHostTrusted = false,762 INFO sasl.SaslDataTransferClient: SASL encryption trust check: localHostTrusted = false,829 INFO mapreduce.JobSubmitter: number of splits:3
2020-09-30 15:17:53,099 INFO sasl.SaslDataTransferClient: SASL encryption trust check: localHostTrusted = false,remoteHostTrusted = false
2020-09-30 15:17:53,190 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1601461031349_0008
2020-09-30 15:17:53,191 INFO mapreduce.JobSubmitter: Executing with tokens: []
2020-09-30 15:17:53,338 INFO conf.Configuration: resource-types.xml not found
2020-09-30 15:17:53,339 INFO resource.ResourceUtils: Unable to find 'resource-types.xml'.
2020-09-30 15:17:53,389 INFO impl.YarnClientImpl: Submitted application application_1601461031349_0008
2020-09-30 15:17:53,425 INFO mapreduce.Job: The url to track the job: http://CORSAIR:8088/proxy/application_1601461031349_0008/
2020-09-30 15:17:53,426 INFO mapreduce.Job: Running job: job_1601461031349_0008
2020-09-30 15:17:57,447 INFO mapreduce.Job: Job job_1601461031349_0008 running in uber mode : false
2020-09-30 15:17:57,448 INFO mapreduce.Job: map 0% reduce 0%
2020-09-30 15:17:57,460 INFO mapreduce.Job: Job job_1601461031349_0008 Failed with state Failed due to: Application application_1601461031349_0008 Failed 2 times due to AM Container for appattempt_1601461031349_0008_000002 exited with exitCode: 1
Failing this attempt.Diagnostics: [2020-09-30 15:17:56.845]Exception from container-launch.
Container id: container_1601461031349_0008_02_000001
Exit code: 1
Shell output: 1 file(s) moved.
Setting up env variables
Setting up job resources
copying debugging @R_661_4045@ion
C:\tmp\hadoop-Admin\nm-local-dir\usercache\Admin\appcache\application_1601461031349_0008\container_1601461031349_0008_02_000001>rem Creating copy of launch script
C:\tmp\hadoop-Admin\nm-local-dir\usercache\Admin\appcache\application_1601461031349_0008\container_1601461031349_0008_02_000001>copy "launch_container.cmd" "C:/hadoop-3.2.1/logs/userlogs/application_1601461031349_0008/container_1601461031349_0008_02_000001/launch_container.cmd"
1 file(s) copied.
C:\tmp\hadoop-Admin\nm-local-dir\usercache\Admin\appcache\application_1601461031349_0008\container_1601461031349_0008_02_000001>rem Determining directory contents
C:\tmp\hadoop-Admin\nm-local-dir\usercache\Admin\appcache\application_1601461031349_0008\container_1601461031349_0008_02_000001>dir 1>>"C:/hadoop-3.2.1/logs/userlogs/application_1601461031349_0008/container_1601461031349_0008_02_000001/directory.info"
Launching container
[2020-09-30 15:17:56.848]Container exited with a non-zero exit code 1. Last 4096 bytes of stderr :
'"C:\jdk-15"' is not recognized as an internal or external command,operable program or batch file.
[2020-09-30 15:17:56.848]Container exited with a non-zero exit code 1. Last 4096 bytes of stderr :
'"C:\jdk-15"' is not recognized as an internal or external command,operable program or batch file.
For more detailed output,check the application tracking page: http://CORSAIR:8088/cluster/app/application_1601461031349_0008 Then click on links to logs of each attempt.
. Failing the application.
2020-09-30 15:17:57,477 INFO mapreduce.Job: Counters: 0
PS C:\hadoop-3.2.1\bin>`
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)