Objective:
Based on the method introduced in the previous chapter, the development is very inconvenient. [0007] Example of an Eclipse development HDFs program under Windows
Install the plug-in, easy to follow directly under the Windows IDE Development debugging.
Environment:
Linux Hadoop 2.6.4, reference article [0001]
Eclipse Version:luna Service Release 1 (4.4.1) under Win 7 64
hadoop-eclipse-plugin-2.6.4.jar:http://download.csdn.net/detail/tondayong1981/9437360
Hadoop 2.6.4 Installer Package
1. Preparing the Hadoop installation package
Unzip the Hadoop 2.6.4 installer package under Windows. Etc/hadoop all configuration files in the Hadoop installation directory on Linux
Replace all of the extracted profiles under Windows
2. Installing plugins
- When Eclipse is off, put Hadoop-eclipse-plugin-2.6.4.jar into the directory under the Eclipse installation directory \plugins\
- Start eclipse
- menu bar, window windows-> preferences preferences->hadoop mapeduce, specify the Hadoop path as the previous decompression path
- menu bar, window windows->open perspective->other-> Select map/reduce ok->map/reduce location tab, right blue small elephant open the configuration window, Make the following settings and click OK
The 1 location is the configured name, any.
The 2 location is the mapreduce.jobhistory.address configuration in the Mapred-site.xml file, and if not, the default is 10020.
The 3 location is fs.defaultfs:hdfs://ssmaster:9000 in the Core-site.xml file.
This is the online find picture, my settings
hadoop2.6 pseudo-distributed, ssmaster:50020,ssmaster:9000
After the setup is successful, the file directory for Linux Hadoop HDFs can be displayed directly here in Eclipse
3. Problems that may arise
One of the above directories may prompt:
Permission Denied:user=administrator, Access=write, inode= "Hadoop": hadoop:supergroup:rwxr-xr-x
User Administator is denied by the permission system when performing write operations on Hadoop, Windows Eclipse defaults to user administator to access Hadoop files
Resolved as follows:
Windows adds environment variable Hadoop_user_name, with a value of HADOOP (this is the hadoop2.6.4 user name on Linux)
Restart Eclipse in effect
Z Summary:
Come on, good job.
Follow-up :
Follow the procedures in the reference, run, test the direct running program can be successful
C Reference:
C.1 win7+eclipse+hadoop2.6.4 Development Environment Construction
C.2 Hadoop Learning Note (4)-eclipse Hadoop2.6.4 development environment under construction
C.3 solutions to permission denied problems when developing eclipse plug-ins using Hadoop MR
[0008] Windows 7 under Eclipse's hadoop2.6.4 plugin installation uses