简体   繁体   English

使用java在hadoop上运行mapreduce程序时出错

[英]Error while running mapreduce program on hadoop using java

Hey guys I m following http://www.tutorialspoint.com/hadoop/hadoop_mapreduce.htm . 嘿伙计们关注http://www.tutorialspoint.com/hadoop/hadoop_mapreduce.htm After running the program using this 使用此程序运行程序后

hadoop jar units.jar hadoop.ProcessUnits input_dir output_dir

I m getting the following error: 我收到以下错误:

16/09/04 20:32:14 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 16/09/04 20:32:14 WARN util.NativeCodeLoader:无法为您的平台加载native-hadoop库...使用适用的builtin-java类

16/09/04 20:32:15 INFO Configuration.deprecation: session.id is deprecated. 16/09/04 20:32:15 INFO Configuration.deprecation:不推荐使用session.id. Instead, use dfs.metrics.session-id 相反,请使用dfs.metrics.session-id

16/09/04 20:32:15 INFO jvm.JvmMetrics: Initializing JVM Metrics with processName=JobTracker, sessionId= 16/09/04 20:32:15 INFO jvm.JvmMetrics:使用processName = JobTracker初始化JVM指标,sessionId =

16/09/04 20:32:15 INFO jvm.JvmMetrics: Cannot initialize JVM Metrics with processName=JobTracker, sessionId= - already initialized 16/09/04 20:32:15 INFO jvm.JvmMetrics:无法使用processName = JobTracker初始化JVM指标,sessionId = - 已初始化

16/09/04 20:32:15 WARN mapreduce.JobResourceUploader: Hadoop command-line option parsing not performed. 16/09/04 20:32:15 WARN mapreduce.JobResourceUploader:未执行Hadoop命令行选项解析。 Implement the Tool interface and execute your application with ToolRunner to remedy this. 实现Tool接口并使用ToolRunner执行您的应用程序以解决此问题。

16/09/04 20:32:15 INFO mapreduce.JobSubmitter: Cleaning up the staging area file:/app/hadoop/tmp/mapred/staging/hduser932260839/.staging/job_local932260839_0001 Exception in thread "main" ExitCodeException exitCode=1: chmod: cannot access `/app/hadoop/tmp/mapred/staging/hduser932260839/.staging/job_local932260839_0001': No such file or directory 16/09/04 20:32:15 INFO mapreduce.JobSubmitter:清理临时区域文件:/app/hadoop/tmp/mapred/staging/hduser932260839/.staging/job_local932260839_0001线程“main”中的异常ExitCodeException exitCode = 1: chmod:无法访问`/app/hadoop/tmp/mapred/staging/hduser932260839/.staging/job_local932260839_0001':没有这样的文件或目录

You can see from the last few lines of the error that the java program you are running cannot access the folder /app/hadoop/........... 你可以从错误的最后几行看到你运行的java程序无法访问文件夹/ app / hadoop / ...........

The Solution is to change ownership for the folder /app/hadoop like this: 解决方案是更改文件夹/ app / hadoop的所有权,如下所示:

chown USER_NAME /app/hadoop

Replace "USER_NAME" with your user name. 将“USER_NAME”替换为您的用户名。 It Works fine! 它工作正常!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM