win8+hadoop1.2.1+eclipse4.4.2插件安装

1.下载解压

1.下载hadoop1.2.1 http://apache.fayea.com/hadoop/common/hadoop-1.2.1/  hadoop-1.2.1.tar.gz 61M

2.下载eclipse最新版本4.4.2  http://www.eclipse.org/downloads/    155M

3.下载ant  http://apache.fayea.com/ant/binaries/  apache-ant-1.9.4-bin.zip

2.修改

1.修改D:\soft\hadoop\hadoop-1.2.1\hadoop-1.2.1\src\contrib\eclipse-plugin下的build.properties,修改后文件内容如下

#   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/
eclipse.home=D:/soft/eclipse
version=1.2.1


谨记:变量值后面不能有空格,因为该处变量在后面的build.xml中的路径名中要引用

2.修改build.xml,红色字体为新增部分
a.

 <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> 
<fileset dir="../../../">  
    <include name="hadoop*.jar"/>  
    </fileset>

  </path>

b.注释两行,新增两行

<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>

3.ant编译

解压ant并加入环境变量,cmd切换到D:\soft\hadoop\hadoop-1.2.1\hadoop-1.2.1\src\contrib\eclipse-plugin,执行ant

BUILD SUCCESSFUL
Total time: 5 seconds

4.复制插件并重启

从D:\soft\hadoop\hadoop-1.2.1\hadoop-1.2.1\build\contrib\eclipse-plugin 复制生成的hadoop-eclipse-plugin-1.2.1.jar 到eclipse的plugin文件夹下,重启,则在new project中会看到map reduce


注意:过程中需要联网












  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值