Generally when we try to run a mapreduce program from eclipse under windows operating system it gives the fallowing error.
install eclipse(j2se) is fine
install maven plug for eclipse, google "maven plugin for eclipse update site"
download
fix the following error message:
java.io.IOException: Failed to set permissions of path: \tmp\hadoop-XY1267\mapred\staging\XY1267625012668\.staging to 0700
https://github.com/congainc/patch-hadoop_7682-1.0.x-win
add this jar file to eclipse java project classpath
in your program, add the following configuration:
job.getConfiguration().set("fs.file.impl", "com.conga.services.hadoop.patch.HADOOP_7682.WinLocalFileSystem");
now you are ready to run map reduce inside eclipse, on windows! you don't even need to install hadoop onto your pc!
14/08/25 18:09:21 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
14/08/25 18:09:21 ERROR security.UserGroupInformation: PriviledgedActionException as:{username} cause:java.io.IOException: Failed to set permissions of path: \tmp\hadoop-{username}\mapred\staging\{username}1667268516\.staging to 0700
Exception in thread "main" java.io.IOException: Failed to set permissions of path: \tmp\hadoop-{username}\mapred\staging\{username}1667268516\.staging to 0700
at org.apache.hadoop.fs.FileUtil.checkReturnValue(FileUtil.java:691)
at org.apache.hadoop.fs.FileUtil.setPermission(FileUtil.java:664)
at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:514)
at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:349)
at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:193)
at org.apache.hadoop.mapreduce.JobSubmissionFiles.getStagingDir(JobSubmissionFiles.java:126)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:942)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:936)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1190)
at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:936)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:550)
at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:580)
at wordcount.NewMapRed.main(NewMapRed.java:61)
after some workaround i found the solution for this issue, now i am going to share it with all...
Solution:
install jdk 1.7, set path to jdk1.7/bininstall eclipse(j2se) is fine
install maven plug for eclipse, google "maven plugin for eclipse update site"
download
fix the following error message:
java.io.IOException: Failed to set permissions of path: \tmp\hadoop-XY1267\mapred\staging\XY1267625012668\.staging to 0700
download patch-hadoop_7682-1.0.x-win from the following url
https://github.com/congainc/patch-hadoop_7682-1.0.x-win
add this jar file to eclipse java project classpath
in your program, add the following configuration:
job.getConfiguration().set("fs.file.impl", "com.conga.services.hadoop.patch.HADOOP_7682.WinLocalFileSystem");
now you are ready to run map reduce inside eclipse, on windows! you don't even need to install hadoop onto your pc!
***Thank you ***
I am getting a new exception after running this patch.
ReplyDeleteINFO: Cleaning up the staging area file:/tmp/hadoop-shabbir/mapred/staging/shabbir2142722304/.staging/job_local2142722304_0003
Exception in thread "main" java.lang.RuntimeException: Error while running command to get file permissions : java.io.IOException: Cannot run program "ls": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at org.apache.hadoop.util.Shell.runCommand(Shell.java:200)
at org.apache.hadoop.util.Shell.run(Shell.java:182)
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:375)
at org.apache.hadoop.util.Shell.execCommand(Shell.java:461)
at org.apache.hadoop.util.Shell.execCommand(Shell.java:444)
at org.apache.hadoop.fs.FileUtil.execCommand(FileUtil.java:712)
at org.apache.hadoop.fs.RawLocalFileSystem$RawLocalFileStatus.loadPermissionInfo(RawLocalFileSystem.java:448)
at org.apache.hadoop.fs.RawLocalFileSystem$RawLocalFileStatus.getPermission(RawLocalFileSystem.java:423)
at org.apache.hadoop.filecache.TrackerDistributedCacheManager.checkPermissionOfOther(TrackerDistributedCacheManager.java:364)
at org.apache.hadoop.filecache.TrackerDistributedCacheManager.isPublic(TrackerDistributedCacheManager.java:328)
at org.apache.hadoop.filecache.TrackerDistributedCacheManager.determineCacheVisibilities(TrackerDistributedCacheManager.java:832)
at org.apache.hadoop.filecache.TrackerDistributedCacheManager.determineTimestampsAndCacheVisibilities(TrackerDistributedCacheManager.java:756)
at org.apache.hadoop.mapred.JobClient.copyAndConfigureFiles(JobClient.java:843)
at org.apache.hadoop.mapred.JobClient.copyAndConfigureFiles(JobClient.java:734)
at org.apache.hadoop.mapred.JobClient.access$400(JobClient.java:179)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:951)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:936)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1190)
at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:936)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:550)
at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:580)
at org.apache.mahout.vectorizer.DictionaryVectorizer.makePartialVectors(DictionaryVectorizer.java:328)
at org.apache.mahout.vectorizer.DictionaryVectorizer.createTermFrequencyVectors(DictionaryVectorizer.java:200)
at org.apache.mahout.vectorizer.SparseVectorsFromSequenceFiles.run(SparseVectorsFromSequenceFiles.java:274)
at org.shabbir.sentiment_analysis2.NaiveBayes.sequenceFileToSparseVector(NaiveBayes.java:86)
at org.shabbir.sentiment_analysis2.NaiveBayes.main(NaiveBayes.java:57)
Those rules moreover attempted to wind up a decent method to perceive that other individuals online have the indistinguishable enthusiasm like mine to get a handle on incredible arrangement more around this condition. Dotnet developer
ReplyDeleteAuthorized Dot Net training in chennai
I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
ReplyDeleteAmazon Web Services Training in Chennai
Best Java Training Institute Chennai
Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
ReplyDeleteOracle training in marathahalli
Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
ReplyDeleteDevOps online Training
Devops training in marathahalli
Devops training in rajajinagar
This is such a good post. One of the best posts that I\'ve read in my whole life. I am so happy that you chose this day to give me this. Please, continue to give me such valuable posts. Cheers!
ReplyDeletepython training in Bangalore
python training in pune
python online training
Good Post, I am a big believer in posting comments on sites to let the blog writers know that they ve added something advantageous to the world wide web.
ReplyDeleteData Science training in rajaji nagar | Data Science with Python training in chenni
Data Science training in electronic city | Data Science training in USA
Data science training in pune | Data science training in kalyan nagar
This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me..
ReplyDeleteData science course in tambaram | Data Science course in anna nagar
Data Science course in chennai | Data science course in Bangalore
Data Science course in marathahalli | Data Science course in btm
I really like your blog. You make it interesting to read and entertaining at the same time. I cant wait to read more from you.
ReplyDeleteangularjs Training in btm
angularjs Training in electronic-city
angularjs online Training
angularjs Training in marathahalli
angularjs interview questions and answers
I feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Thanks once more for all the details.
ReplyDeletenebosh course in chennai
Thank you for benefiting from time to focus on this kind of, I feel firmly about it and also really like comprehending far more with this particular subject matter. In case doable, when you get know-how, is it possible to thoughts modernizing your site together with far more details? It’s extremely useful to me.
ReplyDeleteMicrosoft Azure online training
Selenium online training
Java online training
Java Script online training
Share Point online training
This is a nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.
ReplyDeletedevops online training
aws online training
data science with python online training
data science online training
rpa online training
And indeed, I’m just always astounded concerning the remarkable things served by you. Some four facts on this page are undeniably the most effective I’ve had.
ReplyDeleteData science Course Training in Chennai | Best Data Science Training in Chennai
RPA Course Training in Chennai | Best RPA Training in Chennai
AWS Course Training in Chennai | Best AWS Training in Chennai
Devops Course Training in Chennai | Best Devops Training in Chennai
Selenium Course Training in Chennai | Best Selenium Training in Chennai
Java Course Training in Chennai | Best Java Training in Chennai
Your very own commitment to getting the message throughout came to be rather powerful and have consistently enabled employees just like me to arrive at their desired goals.
ReplyDeleteBest PHP Training Institute in Chennai|PHP Course in chennai
Best .Net Training Institute in Chennai
Big Data Hadoop Training in Chennai
Linux Training in Chennai
Cloud Computing Training in Chennai