In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to install hadoop plug-ins for eclipse on Ubuntu and run Hadoop programs on eclipse". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Hadoop version: 0.20.203.0
Eclipse version: the latest version of indigo (http://www.eclipse.org/downloads/)
To install eclipse is to extract it, but you must first modify the permissions of the compressed file:
Sudo chmod 777 eclipse-jee-indigo-SR2-linux-gtk-x86_64.tar.gz
Then change the permissions of the extracted folder to 777:
Sudo chmod 777-R eclipse
Now you can go to the eclipse folder and open eclipse, but you can't write a Hadoop program yet. Now, here comes the problem.
It is said on the Internet that it is OK to copy the hadoop-eclipse-plugin-0.20.203.0.jar under hadoop-0.20.203.0/contrib/ to eclipse/plugins directly, but the author encounters the following problems: Map/Reduce location status updater,org/codehaus/jackson/map/JsonMappingException
Find the online solution, saying that there are 5 jar packages missing in the package just copied. To add them, go to the lib folder under the root directory of hadoop and add the following 5 packages to hadoop-eclipse-plugin-0.20.203.0.jar 's lib (open the package you just copied, and drag the following five packages directly into it)
Commons-configuration-1.6.jar
Commons-httpclient-3.0.1.jar
Commons-lang-2.4.jar
Jackson-core-asl-1.0.1.jar
Jackson-mapper-asl-1.0.1.jar
Then change the MANIFEST.MF under the META-INF directory of the package, and modify the classpath to the following:
Bundle-ClassPath:classes/,lib/hadoop-core.jar,lib/commons-cli-1.2.jar,lib/commons-httpclient-3.0.1.jar,lib/jackson-core-asl-1.0.1.jar,lib/jackson-mapper-asl-1.0.1.jar,lib/commons-configuration-1.6.jar,lib/commons-lang-2.4.jar
Save exit, and finally, copy the new package to reproduce and open eclipse
Then, add the path to Hadoop in eclipse as follows:
Just join the Hadoop path
Open the MapReduce view:
Then select Map/Reduce:
Then you can see that there is an extra Map/Reduce Locations below.
Right-click in the space below to select New Hadoop location, and the following screen appears:
Fill in the port number in mapred-site.xml in Map/Reduce Master and the port number in core-site.xml in the Port next to it.
Just fill in the Location name above. When you are finished, you can see the figure on the left as follows:
However, the contents will not be displayed immediately and must be refreshed. In the future, you have to refresh to see things after running the program or uploading things to HDFS, if you want to see them on this.
Now, demonstrate an operation to execute the Hadoop program on eclipse (the program is WordCount):
Select Run Congratulations:
Enter the following screen:
Double-click Java Application on the left, and the content on the right will be generated automatically, then switch to the Arguments tab and fill in the following:
The first paragraph is the input folder and the second paragraph is the output folder. Click Run, and the program starts, as follows:
The operation is successful, and the results are as follows:
This is the end of "how to install the hadoop plug-in for eclipse on Ubuntu and run the Hadoop program on eclipse". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.