How to link hadoop-related sources to eclipse engineering

Source: Internet
Author: User

It is very convenient to read the source code in Eclipse, which is conducive to our usual study, and describes how to import the Hadoop source code into the Eclpse Java Project.

first, unzip the source code

First, we use winrar in Windows to extract hadoop-1.1.2.tar.gz ,1 shows

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4D/A7/wKiom1RWWAfBbMIzAAOkJwZ9q6w507.jpg "style=" float: none; "title=" 1.jpg "alt=" Wkiom1rwwafbbmizaaokjwz9q6w507.jpg "/>


we focus on folder src, browse for this folder,as shown in 2

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4D/A7/wKiom1RWWAnieJCMAALi0NyzWq8272.jpg "title=" 2.jpg " Style= "Float:none;" alt= "wkiom1rwwaniejcmaali0nyzwq8272.jpg"/>


We need these three folders, and we'll copy the three folders to Eclipse in a second .

two. Create a Java project

Create a Java project from the menu bar in Eclipse ,3,

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4D/A6/wKioL1RWWGijUfd7AAFdgiWQt6Q296.jpg "title=" 3.jpg " Style= "Float:none;" alt= "wkiol1rwwgijufd7aafdgiwqt6q296.jpg"/>

Figure 3

The project created here is called "Hadoopshanghai". On the project you created, right-click, select Last item in the pop-up menu,4

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4D/A7/wKiom1RWWAvQUxvWAAHLyapXhQ8326.jpg "title=" 4.jpg " Style= "Float:none;" alt= "wkiom1rwwavquxvwaahlyapxhq8326.jpg"/>

Figure 4

three. Importing jar Packages

in the pop-up window, on the left, select Javabuild Path ", select"Libraries "on the right andclick"Add External JARs ",5

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4D/A6/wKioL1RWWGyBTyGeAALXllA6hlU470.jpg "title=" 5.jpg " Style= "Float:none;" alt= "wkiol1rwwgybtygeaalxlla6hlu470.jpg"/>

Figure 5

in the pop-up window, put all the * in the Hadoop source . jar file import in,6

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4D/A7/wKiom1RWWBCQDipWAAPOVQKuxWQ428.jpg "title=" 6.jpg " Style= "Float:none;" alt= "wkiom1rwwbcqdipwaapovqkuxwq428.jpg"/>

Figure 6

There is also a Ant.jarthat needs to be imported.

Four. Associated Source code

then link the source code, select "source", on the right, click on the "LinkSource ... ", a pop-up window appears,7

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4D/A6/wKioL1RWWG-Ddxp1AALjwPsBIlE242.jpg "title=" 7.jpg " Style= "Float:none;" alt= "wkiol1rwwg-ddxp1aaljwpsbile242.jpg"/>

Figure 7

in the pop-up window, tap Browse ... , the three source packages in Figure 2 are linked in turn. as shown in result 8

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4D/A7/wKiom1RWWBHgS_HaAABaBHi4FWI905.jpg "title=" 8.jpg " Style= "Float:none;" alt= "wkiom1rwwbhgs_haaababhi4fwi905.jpg"/>

The Hadoop source can now be linked to the Eclipse project.


This article is from the "Exchange Study" blog, please make sure to keep this source http://51log.blog.51cto.com/6076767/1571089

How to link hadoop-related sources to eclipse engineering

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.