linux安装
1.下载hadoop1.2.1
http://mirror.esocc.com/apache/hadoop/common/hadoop-1.2.1/hadoop-1.2.1.tar.gz
2.解压hadoop1.2.1(
注意:我hadoop-1.2.1的安装根目录为/soft/hadoop-1.2.1,安装路径不同下面注意修改)
tar -zxvf hadoop-1.2.1.tar.gz
3.jdk安装配置(略过)
注意:最好使用jdk1.6
4.安装eclipse(略过)
注意:eclipse3.6.1(Centos 6.4自带eclipse),eclipse3.7编译会出错,笔者已经试过
5.导入eclipse-plugin项目
导入/soft/hadoop-1.2.1/src/contrib/eclipse-plugin项目
6.导入项目需要的jar
7.配置build.properties,增加eclipse.home和version,可以复制,替换build.properties
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
output.. = bin/
bin.includes = META-INF/,\
plugin.xml,\
resources/,\
classes/,\
classes/,\
lib/
#add eclipse.home and hadoop version
eclipse.home=/usr/lib/eclipse
version=1.2.1
8.修改build.xml
a.搜索<path id="eclipse-sdk-jars">,在这个path里加入编译时hadoop需要的jar,可以直接复制替换原来的eclipse-sdk-jars的path标签
<path id="eclipse-sdk-jars">
<fileset dir="${eclipse.home}/plugins/">
<include name="org.eclipse.ui*.jar"/>
<include name="org.eclipse.jdt*.jar"/>
<include name="org.eclipse.core*.jar"/>
<include name="org.eclipse.equinox*.jar"/>
<include name="org.eclipse.debug*.jar"/>
<include name="org.eclipse.osgi*.jar"/>
<include name="org.eclipse.swt*.jar"/>
<include name="org.eclipse.jface*.jar"/>
<include name="org.eclipse.team.cvs.ssh2*.jar"/>
<include name="com.jcraft.jsch*.jar"/>
</fileset>
<!-- 增加 -->
<!--build need hadoop classes file.-->
<fileset dir="../../../">
<include name="hadoop*.jar"/>
</fileset>
</path>
b.搜索<target name="jar" depends="compile" unless="skip.contrib">,将2个copy标签注释,可以复制直接替换原来的compile的target
<!-- Override jar target to specify manifest -->
<target name="jar" depends="compile" unless="skip.contrib">
<mkdir dir="${build.dir}/lib"/>
<!-- 注释 -->
<!--
<copy file="${hadoop.root}/build/hadoop-core-${version}.jar" tofile="${build.dir}/lib/hadoop-core.jar" verbose="true"/>
<copy file="${hadoop.root}/build/ivy/lib/Hadoop/common/commons-cli-${commons-cli.version}.jar" todir="${build.dir}/lib" verbose="true"/>
-->
<!-- 增加 -->
<copy file="${hadoop.root}/hadoop-core-${version}.jar" tofile="${build.dir}/lib/hadoop-core.jar" verbose="true"/>
<copy file="${hadoop.root}/lib/commons-cli-${commons-cli.version}.jar" todir="${build.dir}/lib" verbose="true"/>
<jar
jarfile="${build.dir}/hadoop-${name}-${version}.jar"
manifest="${root}/META-INF/MANIFEST.MF">
<fileset dir="${build.dir}" includes="classes/ lib/"/>
<fileset dir="${root}" includes="resources/ plugin.xml"/>
</jar>
</target>
9.ant编译
a.在eclipse中点击Window->Show View->Other->Ant->Ant
b.将build.xml用鼠标拖到Ant视图
c.点Ant视图的绿色run图标
如图:
10.编译完成
- 大小: 27.5 KB
- 大小: 5.7 KB
分享到:
相关推荐
hadoop-eclipse-plugin-1.2.1hadoop-eclipse-plugin-1.2.1hadoop-eclipse-plugin-1.2.1hadoop-eclipse-plugin-1.2.1
用来配置myeclipse或eclipse对应的hadoop 插件,方便开发
该资源包里面包含eclipse上的hadoop-1.2.1版本插件的jar包和hadoop-1.2.1.tar.gz,亲测可用~~请在下载完该包后解压,将hadoop-1.2.1放置于Eclipse\plugins目录下,然后重启eclipse,将hadoop-1.2.1.tar.gz放到D:\...
Eclipse集成Hadoop2.10.0的插件,使用`ant`对hadoop的jar包进行打包并...- `hadoop2x-eclipse-plugin-master/src/contrib/eclipse-plugin/build.xml` 开源源地址: https://github.com/winghc/hadoop2x-eclipse-plugin
hadoop-eclipse-plugin-2.7.4.jar和hadoop-eclipse-plugin-2.7.3.jar还有hadoop-eclipse-plugin-2.6.0.jar的插件都在这打包了,都可以用。
hadoop-eclipse-plugin-3.1.1, hadoop eclipse 插件 3.1.1
hadoop-eclipse-plugin-1.2.1.jar ,适用于hadoop1.2.1,eclipse 4.2(Juno)
hadoop-eclipse-plugin-2.7.3和2.7.7的jar包 hadoop-eclipse-plugin-2.7.3和2.7.7的jar包 hadoop-eclipse-plugin-2.7.3和2.7.7的jar包 hadoop-eclipse-plugin-2.7.3和2.7.7的jar包
最新的hadoop-eclipse-plugin-2.7.4.jar 很好用的hadoop的eclipse插件。自己编译的。 经过测试,使用没有任何问题。 请各位放心使用
hadoop-eclipse-plugin-3.1.3,eclipse版本为eclipse-jee-2020-03
hadoop-eclipse-plugin-2.8.3.jar hadoop eclipse插件,hadoop版本2.8.3,eclipse版本oxygen,亲测可以,用问题请留言:http://blog.csdn.net/familyshizhouna/article/details/78892500
找不到与hadoop-2.9.2版本对应的插件,手动生成的hadoop-eclipse-plugin-2.9.2版本,
Hadoop Eclipse是Hadoop开发环境的插件,用户在创建Hadoop程序时,Eclipse插件会自动导入Hadoop编程接口的jar文件,这样用户就可以在Eclipse插件的图形界面中进行编码、调试和运行Hadop程序,也能通过Eclipse插件...
hadoop-eclipse-plugin-2.7.2.jar完美兼容版 Tested with following eclipse version for hadoop2.7.2(http://pan.baidu.com/s/1i4plIfF): Eclipse Java EE IDE for Web Developers. Version: Mars.1 Release (4.5.1...
hadoop-eclipse-plugin.jar插件基于Ubuntu18.04和Hadoop-3.2.1编译的,最后可以在eclipse创建Map Reduce文件
该文档是hadoop-eclipse-plugin-2.7.6的下载地址及提取码
hadoop-eclipse-plugin-2.7.1.jar插件,直接放在eclipse插件目录中
hadoop-eclipse-plugin-2.6.0和hadoop-eclipse-plugin-2.7.3的jar包,亲测可用用。 将插件hadoop-eclipse-plugin-2.6.0.jar,从/data/hadoop3目录下,拷贝到/apps/eclipse/plugins的插件目录下。 cp /data/hadoop3...