This article mainly explains how to compile and install the detailed process of Hadoop2.xeclipseplugin plug-in: Environment Parameter compilation process installation and configuration [1], Environment Parameter EclipseJunoServiceRelease2Hadoop2.2.0Java1.6.0 _ 65MacOXS10. 9.2 [2]. Currently, the source code of the Hadoop2.x plug-in is hosted on github,
This article describes how to compile, install, and configure the Hadoop2.x eclipse plugin: install and configure environment parameters during compilation [1]. The environment parameters are Eclipse Juno Service Release 2 Hadoop2.2.0 Java 1.6.0 _ 65 Mac OXS 10.9.2 [2]. Currently, the source code of the Hadoop2.x plug-in is hosted on github.,
This article describes how to compile, install, and configure the Hadoop2.x eclipse plugin:
- Environment Parameters
- Compilation process
- Install configurations
[1]. Environment Parameters
- Eclipse Juno Service Release 2
- Hadoop2.2.0
- Java 1.6.0 _ 65
- Mac OXS 10.9.2
[2] compilation processCurrently, the source code of the Hadoop2.x plug-in is hosted on github. The first step is to download the source code.
git clone https://github.com/winghc/hadoop2x-eclipse-plugin.git
Compile source code:
$cd src/contrib/eclipse-plugin$ant jar -Dversion=2.2.0 -Declipse.home=/Applications/eclipse -Dhadoop.home=/usr/local/share/hadoop
However, the first compilation failed on my machine, similar to the following error message:
............[javac] Compiling 45 source files to /Users/micmiu/no_sync/opensource_code/hadoop/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/classes [javac] /Users/micmiu/no_sync/opensource_code/hadoop/hadoop2x-eclipse-plugin/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/MapReduceNature.java:35: package org.eclipse.jdt.core does not exist [javac] import org.eclipse.jdt.core.IClasspathEntry; [javac] ^ [javac] /Users/micmiu/no_sync/opensource_code/hadoop/hadoop2x-eclipse-plugin/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/MapReduceNature.java:36: package org.eclipse.jdt.core does not exist [javac] import org.eclipse.jdt.core.IJavaProject; [javac] ^..............
It is estimated that my eclipse does not
org.eclipse.jdt.core*Related lib package, unable to find the class caused, then go to my local directory?
/Applications/eclipse/plugins/The following shows that there is indeed no similar lib package, which proves the previous judgment. I had to find
org.eclipse.jdt.core_3.7.3.v20120119-1537.jar? Copy to the plug-in source code directory?
src/contrib/eclipse-plugin/libAnd must be modified at the same time?
src/contrib/eclipse-plugin/build.xmlFile, add the following two modifications:
......
......Then execute the compilation command to see? Build successful indicates that the compilation is SUCCESSFUL:
micmiu-mbp:eclipse-plugin micmiu$ ant jar -Dversion=2.2.0 -Declipse.home=/Applications/eclipse -Dhadoop.home=/usr/local/share/hadoopBuildfile: /Users/micmiu/no_sync/opensource_code/hadoop/hadoop2x-eclipse-plugin/src/contrib/eclipse-plugin/build.xmlcheck-contrib:init: [echo] contrib: eclipse-plugininit-contrib:ivy-download: [get] Getting: http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.1.0/ivy-2.1.0.jar [get] To: /Users/micmiu/no_sync/opensource_code/hadoop/hadoop2x-eclipse-plugin/ivy/ivy-2.1.0.jar [get] Not modified - so not downloadedivy-probe-antlib:ivy-init-antlib:ivy-init:[ivy:configure] :: Ivy 2.1.0 - 20090925235825 :: http://ant.apache.org/ivy/ ::[ivy:configure] :: loading settings :: file = /Users/micmiu/no_sync/opensource_code/hadoop/hadoop2x-eclipse-plugin/ivy/ivysettings.xmlivy-resolve-common:ivy-retrieve-common:[ivy:cachepath] DEPRECATED: 'ivy.conf.file' is deprecated, use 'ivy.settings.file' instead[ivy:cachepath] :: loading settings :: file = /Users/micmiu/no_sync/opensource_code/hadoop/hadoop2x-eclipse-plugin/ivy/ivysettings.xmlcompile: [echo] contrib: eclipse-plugin ...... [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 7 warningsjar: [mkdir] Created dir: /Users/micmiu/no_sync/opensource_code/hadoop/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib [copy] Copying 9 files to /Users/micmiu/no_sync/opensource_code/hadoop/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/lib ...... [jar] Building jar: /Users/micmiu/no_sync/opensource_code/hadoop/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin/hadoop-eclipse-plugin-2.2.0.jarBUILD SUCCESSFULTotal time: 37 secondsmicmiu-mbp:eclipse-plugin m
After compilation, you can? Build/contrib/eclipse-plugin/hadoop-eclipse-plugin-2.2.0.jar find the generated jar package. : Http://yun.baidu.com/s/1o6K457c#dir/path=%2Fsourcecode%2Fbuilder
[3] installation and configuration1. Copy the generated hadoop-eclipse-plugin-2.2.0.jar to the eclipse/plugins path, restart eclipse. 2. click in the eclipse menu? Windows →? Show view →? Other... In the Show View dialog box, enter "map" in the search box, find the "Map/Reduce Locations" option, and click "OK: 3. A "Map/Reduce Locations" Tab page appears on the console: 4. Click the icon on the "Map/Reduce Locations" Tab page? Or right-click the blank area and select "New Hadoop location ...", The dialog box "New hadoop location…" is displayed ...", The configuration is as follows:
- Location name: a random name, for example, hadoop2.2.0
- Map/Reduce (V2) Master: Based on
hdfs-site.xmlSet the value of dfs. datanode. ipc. address in
- DFS Master: the IP address and port of the Name Node.
core-site.xmlConfigure fs. defaultFS value in
After successful configuration, you can see the following information: 5. Open the "preferences" dialog box, search for "hadoop", find the "Hadoop Map/Reduce" item, and click "Browse ..." Configure the hadoop path, for example, my path is
/usr/local/share/hadoop-2.2.0------? EOF? @ Michael Sun? ------