Hadoop-2.6.0 Eclipse run code case, hadoop2.6.0eclipse

Source: Internet
Author: User

Hadoop-2.6.0 Eclipse run code case, hadoop2.6.0eclipse

 

Case study of Hadoop-2.6.0 Eclipse Running code

1. Create eclipse installation directory eclipse:

 

Copy, install, and decompress eclipse:

Decompress:

 

Decompressed eclipse:

 

Eclipse open interface:

 

 

2. Copy the hadoop-eclipse-plugin-2.6.0.jar to the plug-ins directory in eclipse:

Modify the eclipse permission so that you can copy and paste it manually:

Modified permissions:

Copy it in:

3. Select windows à preperences:

 

The copied plug-in is not displayed because of no restart:

4, restart eclipse, you can see the plug-in just installed, Click Browse to import the hadoop-2.6.0 Directory:

5. Click the "Tian" text box in the upper right corner to export the Map/Reduce Workspace:

 

6. Start Hadoop:

View jps:

7. Set the Port:

Right-click the small blue image and select the first one:

Set port 8020:

 

8. previously created files on HDFS, so there are had created files.

9. Create a Map/reduce project:

Select Project:

Create a Map/Reduce project:

Project name:

 

10. Copy the built-in WordCount code:

 

 

 

 

11. Create a test document on the local hard drive:

Upload to HDFS:

Refresh:

The newly created document is displayed. You can see the content you just wrote:

 

12. Run the Code:

Right-click a Run As a RunConfigurations:

 

13. Set the file input and output path on HDFS:

Separated by spaces:

Hdfs: // localhost: 8020/input/file4.txt hdfs: // localhost: 8020/output/out4.txt

 

Console:

 

 

Generated out4.txt content:

 

14. Running is completed:

 

15. Disable hadoop:

 

 

 

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.