Home Database Mysql Tutorial Hadoop2.x eclipse plugin插件编译安装配置

Hadoop2.x eclipse plugin插件编译安装配置

Jun 07, 2016 pm 04:34 PM
eclipse plugin plug-in compile

本文主要讲解如何编译安装配置 Hadoop2.x eclipse plugin插件的详细过程: 环境参数 编译过程 安装配置 [一]、环境参数 Eclipse Juno Service Release 2 Hadoop2.2.0 Java 1.6.0_65 Mac OXS 10.9.2 [二]、编译过程 目前Hadoop2.x的插件源码托管在github上,

hadoop2x-eclipse-plugin-01本文主要讲解如何编译安装配置 Hadoop2.x eclipse plugin插件的详细过程:
  • 环境参数
  • 编译过程
  • 安装配置
[一]、环境参数
  • Eclipse Juno Service Release 2
  • Hadoop2.2.0
  • Java 1.6.0_65
  • Mac OXS 10.9.2
[二]、编译过程 目前Hadoop2.x的插件源码托管在github上,第一步肯定是下载源码
git clone https://github.com/winghc/hadoop2x-eclipse-plugin.git
Copy after login
编译源码:
$cd src/contrib/eclipse-plugin
$ant jar -Dversion=2.2.0 -Declipse.home=/Applications/eclipse -Dhadoop.home=/usr/local/share/hadoop
Copy after login
但是在我的机器上第一次编译时失败了,类似下面的错误信息:
............
[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]                            ^
..............
Copy after login
初步判断估计是我的eclipse中没有 org.eclipse.jdt.core* 相关lib包,无法找到类引起的,后来去我的本机目录?/Applications/eclipse/plugins/ 下查看发现确实没有类似的lib包,证明了之前的判断。只好从其他同事电脑上找到一个 org.eclipse.jdt.core_3.7.3.v20120119-1537.jar ?copy到插件的源码目录 ?src/contrib/eclipse-plugin/lib 下,同时需要修改?src/contrib/eclipse-plugin/build.xml 文件,增加两处修改具体如下:
  <import file="../build-contrib.xml"></import>
  <!-- ex-jar 是需要增加的配置 micmiu.com-->
  <path id="ex-jars">
    <fileset dir="./">
      <include name="org.eclipse.jdt*.jar"></include>
    </fileset> 
  </path>
 ......
  <!-- Override classpath to include Eclipse SDK jars -->
  <path id="classpath">
    <pathelement location="${build.classes}"></pathelement>
    <!--pathelement location="${hadoop.root}/build/classes"/-->
    <path refid="eclipse-sdk-jars"></path>
    <path refid="hadoop-sdk-jars"></path>
    <!-- 需要增加的配置 micmiu.com-->
    <path refid="ex-jars"></path>
  </path>
  ......
Copy after login
然后再执行编译命令,看到?BUILD SUCCESSFUL 表示编译成功:
micmiu-mbp:eclipse-plugin micmiu$ ant jar -Dversion=2.2.0 -Declipse.home=/Applications/eclipse -Dhadoop.home=/usr/local/share/hadoop
Buildfile: /Users/micmiu/no_sync/opensource_code/hadoop/hadoop2x-eclipse-plugin/src/contrib/eclipse-plugin/build.xml
check-contrib:
init:
     [echo] contrib: eclipse-plugin
init-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 downloaded
ivy-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.xml
ivy-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.xml
compile:
     [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 warnings
jar:
    [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.jar
BUILD SUCCESSFUL
Total time: 37 seconds
micmiu-mbp:eclipse-plugin m
Copy after login
编译成功后可以在?build/contrib/eclipse-plugin/hadoop-eclipse-plugin-2.2.0.jar 找到生成的jar包。 下载地址:http://yun.baidu.com/s/1o6K457c#dir/path=%2Fsourcecode%2Fbuilder [三]、安装配置 1、复制生成的 hadoop-eclipse-plugin-2.2.0.jareclipse/plugins 路径下,重启eclipse即可。 2、在eclipse菜单依次点击 ?windows →?show view →?other… ,选择“Show View”对话框打开,搜索框输入“map”,会找到项“Map/Reduce Locations”,点击“确定”按钮: hadoop2x-eclipse-plugin-01 3、控制台会多出一个“Map/Reduce Locations”的Tab页: hadoop2x-eclipse-plugin-02 4、在“Map/Reduce Locations” Tab页 点击图标 ?hadoop2x-eclipse-plugin-03 或者在空白的地方右键,选择“New Hadoop location…”,弹出对话框“New hadoop location…”,配置如下内容: hadoop2x-eclipse-plugin-04
  • Location name :随便取个名字 比如 hadoop2.2.0
  • Map/Reduce(V2) Master :根据hdfs-site.xml中配置dfs.datanode.ipc.address的值填写
  • DFS Master: Name Node的IP和端口,根据core-site.xml中配置fs.defaultFS的值填写
配置成功后可以看到类似如下信息: hadoop2x-eclipse-plugin-06 5、打开“preferences”对话框,搜索“hadoop”,找到”Hadoop Map/Reduce”项,点击”Browse…” 配置hadoop的路径,比如我的路径是 /usr/local/share/hadoop-2.2.0 —————– ?EOF?@Michael Sun?—————–
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to adjust background color settings in Eclipse How to adjust background color settings in Eclipse Jan 28, 2024 am 09:08 AM

How to set background color in Eclipse? Eclipse is a popular integrated development environment (IDE) among developers and can be used for development in a variety of programming languages. It is very powerful and flexible, and you can customize the appearance of the interface and editor through settings. This article will introduce how to set the background color in Eclipse and provide specific code examples. 1. Change the editor background color. Open Eclipse and enter the "Windows" menu. Select "Preferences". Navigate on the left

PyCharm Beginner's Guide: Comprehensive understanding of plug-in installation! PyCharm Beginner's Guide: Comprehensive understanding of plug-in installation! Feb 25, 2024 pm 11:57 PM

PyCharm is a powerful and popular Python integrated development environment (IDE) that provides a wealth of functions and tools so that developers can write code more efficiently. The plug-in mechanism of PyCharm is a powerful tool for extending its functions. By installing different plug-ins, various functions and customized features can be added to PyCharm. Therefore, it is crucial for newbies to PyCharm to understand and be proficient in installing plug-ins. This article will give you a detailed introduction to the complete installation of PyCharm plug-in.

Error loading plugin in Illustrator [Fixed] Error loading plugin in Illustrator [Fixed] Feb 19, 2024 pm 12:00 PM

When launching Adobe Illustrator, does a message about an error loading the plug-in pop up? Some Illustrator users have encountered this error when opening the application. The message is followed by a list of problematic plugins. This error message indicates that there is a problem with the installed plug-in, but it may also be caused by other reasons such as a damaged Visual C++ DLL file or a damaged preference file. If you encounter this error, we will guide you in this article to fix the problem, so continue reading below. Error loading plug-in in Illustrator If you receive an "Error loading plug-in" error message when trying to launch Adobe Illustrator, you can use the following: As an administrator

Pro Guidance: Expert advice and steps on how to successfully install the Eclipse Lombok plug-in Pro Guidance: Expert advice and steps on how to successfully install the Eclipse Lombok plug-in Jan 28, 2024 am 09:15 AM

Professional guidance: Expert advice and steps for installing the Lombok plug-in in Eclipse, specific code examples are required Summary: Lombok is a Java library that simplifies the writing of Java code through annotations and provides some powerful tools. This article will introduce readers to the steps of how to install and configure the Lombok plug-in in Eclipse, and provide some specific code examples so that readers can better understand and use the Lombok plug-in. Download the Lombok plug-in first, we need

Share three solutions to why Edge browser does not support this plug-in Share three solutions to why Edge browser does not support this plug-in Mar 13, 2024 pm 04:34 PM

When users use the Edge browser, they may add some plug-ins to meet more of their needs. But when adding a plug-in, it shows that this plug-in is not supported. How to solve this problem? Today, the editor will share with you three solutions. Come and try it. Method 1: Try using another browser. Method 2: The Flash Player on the browser may be out of date or missing, causing the plug-in to be unsupported. You can download the latest version from the official website. Method 3: Press the "Ctrl+Shift+Delete" keys at the same time. Click "Clear Data" and reopen the browser.

What is the Chrome plug-in extension installation directory? What is the Chrome plug-in extension installation directory? Mar 08, 2024 am 08:55 AM

What is the Chrome plug-in extension installation directory? Under normal circumstances, the default installation directory of Chrome plug-in extensions is as follows: 1. The default installation directory location of chrome plug-ins in windowsxp: C:\DocumentsandSettings\username\LocalSettings\ApplicationData\Google\Chrome\UserData\Default\Extensions2. chrome in windows7 The default installation directory location of the plug-in: C:\Users\username\AppData\Local\Google\Chrome\User

Revealing solutions to Eclipse code running problems: helping you troubleshoot various running errors Revealing solutions to Eclipse code running problems: helping you troubleshoot various running errors Jan 28, 2024 am 09:22 AM

The solution to Eclipse code running problems is revealed: it helps you eliminate various code running errors and requires specific code examples. Introduction: Eclipse is a commonly used integrated development environment (IDE) and is widely used in Java development. Although Eclipse has powerful functions and a friendly user interface, it is inevitable to encounter various running problems when writing and debugging code. This article will reveal some common Eclipse code running problems and provide solutions. Please note that in order to better help readers understand, this

Step-by-step guide to changing background color with Eclipse Step-by-step guide to changing background color with Eclipse Jan 28, 2024 am 08:28 AM

Teach you step by step how to change the background color in Eclipse, specific code examples are required Eclipse is a very popular integrated development environment (IDE) that is often used to write and debug Java projects. By default, the background color of Eclipse is white, but some users may wish to change the background color to suit their preference or to reduce eye strain. This article will teach you step by step how to change the background color in Eclipse and provide specific code examples. Step 1: Open Eclipse First

See all articles