简体   繁体   中英

Error while running mapreduce program on hadoop using java

Hey guys I m following 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:15 INFO Configuration.deprecation: session.id is deprecated. Instead, use 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: Cannot initialize JVM Metrics with processName=JobTracker, sessionId= - already initialized

16/09/04 20:32:15 WARN mapreduce.JobResourceUploader: Hadoop command-line option parsing not performed. Implement the Tool interface and execute your application with ToolRunner to remedy this.

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

You can see from the last few lines of the error that the java program you are running cannot access the folder /app/hadoop/...........

The Solution is to change ownership for the folder /app/hadoop like this:

chown USER_NAME /app/hadoop

Replace "USER_NAME" with your user name. It Works fine!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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