Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to compile the Eclipse plug-in for Hadoop2.2.0

Shulou Source: shulou.com Published: 2022-05-31 23:16:33 10月02日 Update

This article mainly introduces how to compile Hadoop2.2.0 's Eclipse plug-in, the article introduces in great detail, has a certain reference value, interested friends must read it!

My environment:

1.git (download requires, of course, you can also download compressed package, download compressed package does not need git) 2.ant, and configured the environment variable (compilation) 3.jdk1.7_514.centOS_6.5_325. Current directory / opt6.eclipse home directory: / opt/eclipse, version is Kepler (latest plug-in support to this version) ant compilation requires this parameter 7.hadoop home directory: / cluster/hadoop-2.2.0,ant compilation requires this parameter

The first step is to check out the code from github

# you can also download the compressed package directly, and then decompress it. # address of the compressed package: https://github.com/winghc/hadoop2x-eclipse-plugin/archive/master.zipgit clone https://github.com/winghc/hadoop2x-eclipse-plugin.git

Step 2: compile the eclipse plug-in

# after the first step, there will be a hadoop2x-eclipse-plugin folder cd hadoop2x-eclipse-plugin/src/contrib/eclipse-pluginant jar-Dversion=2.2.0-Declipse.home=/opt/eclipse-Dhadoop.home=/cluster/hadoop-2.2.0# in the / opt directory: one step in the ant compilation process will be stuck for a period of time without any output, but don't panic, it's downloading dependent packages from the Internet, about 20 megabytes, but the download speed is a little slow. You need to wait patiently (depending on your character, it will take about 2 hours if you are unlucky, and 30 minutes if you are lucky)

Step 3 install the eclipse plug-in

# after the second step, the jar package of the plug-in will be generated. Copy the jar package in the directory: / opt/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugincd / opt/hadoop2x-eclipse-plugin/build/contrib/eclipse-plugin# to eclipe's plugins directory cp hadoop-eclipse-plugin-2.2.0.jar / opt/eclipse/plugins

The fourth step is to start Eclipse (start with parameters) and write a shell script

Vi / opt/eclipse/EclipseWithHadoop# enter the following #! / bin/bash/opt/eclipse/eclipse-clean-consolelog-debug# Save and exit # give execute permission chmod 111EclipseWithHadoop# link to desktop ln / opt/eclipse/EclipseWithHadoop / root/desktop/Eclipse

Step 5 start Eclipse

Double-click Eclipse on the desktop to start Eclipse

How to use this plug-in is not described here. From the point of view of my use, this plug-in still needs to be improved and will make some mistakes, but it will not affect its use. You can develop hadoop mapreduce projects like ordinary java projects, develop, debug and run the same steps as ordinary java project.

Run time directly, run as java application

Debug as java application directly when debugging (set breakpoints, of course)

The above is all the contents of the article "how to compile the Eclipse plug-in for Hadoop2.2.0". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Plug-ins compilations directories content parameters development normal time desktop version environment article luck project run patience bad character code value Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Docker Apple Redmi Shulou Tech Info