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: