zoukankan      html  css  js  c++  java
  • Hadoop编译

    2.进入目录  ant 即可实现编译(保证ant安装正确,build.xml有此文件)
       1.根据build.xml 会自动生成相应的class与jar
    3.手工生成相应的包
    hadoop-0.20.2-ant.jar
    hadoop-0.20.2-core.jar
    hadoop-0.20.2-examples.jar
    hadoop-0.20.2-test.jar
    hadoop-0.20.2-tools.jar
     
    比如手工生成 hadoop-0.20.2-core.jar
    需重写build.xml 如下
    <?xml version="1.0"?>
    <project name="Hadoop" default="jar"
       xmlns:ivy="antlib:org.apache.ivy.ant">
      <property file="${user.home}/build.properties" />
      <property file="${basedir}/build.properties" />
      <property name="Name" value="Hadoop"/>
      <property name="name" value="hadoop"/>
      <property name="version" value="0.20.3-dev"/>
      <property name="final.name" value="${name}-${version}"/>
      <property name="lib.dir" value="${basedir}/lib"/>
      <property name="conf.dir" value="${basedir}/conf"/>
      <property name="build.dir" value="${basedir}/build"/>
      <property name="build.classes" value="${build.dir}/classes"/>
      <property name="build.webapps" value="${build.dir}/webapps"/>
     
      <target name="jar" description="Make hadoop.jar">
        <tar compression="gzip" destfile="${build.classes}/bin.tgz">
          <tarfileset dir="bin" mode="755"/>
        </tar>
        <jar jarfile="${build.dir}/${final.name}-core.jar"
             basedir="${build.classes}">
          <manifest>
            <section name="org/apache/hadoop">
              <attribute name="Implementation-Title" value="Hadoop"/>
              <attribute name="Implementation-Version" value="${version}"/>
              <attribute name="Implementation-Vendor" value="Apache"/>
            </section>
          </manifest>
          <fileset file="${conf.dir}/commons-logging.properties"/>
          <fileset file="${conf.dir}/log4j.properties"/>
          <fileset file="${conf.dir}/hadoop-metrics.properties"/>
          <zipfileset dir="${build.webapps}" prefix="webapps"/>
        </jar>
      </target>
    </project>
    4.将编译之后的
    hadoop-0.20.2-ant.jar
    hadoop-0.20.2-core.jar(经过测试,可以启动hadoop,说明没问题)
    hadoop-0.20.2-examples.jar
    hadoop-0.20.2-test.jar
    hadoop-0.20.2-tools.jar
    替换至hadoop目录

    5.下一步,将试着修改源代码

  • 相关阅读:
    项目管理工具Redmine各功能测试
    TestLink学习八:TestLink1.9.13与Mantis1.2.19集成
    TestLink学习七:TestLink测试用例Excel转换XML工具
    Mantis1.2.19 在Windows 平台上的安装配置详解
    TestLink学习六:TestLink1.9.13工作使用小结
    TestLink学习五:TestLink1.9.13和JIRA6.3.6的集成
    TestLink学习四:TestLink1.9.13使用说明
    TestLink学习三:发送邮件的两种配置方法
    网页太长怎么截图?
    JIRA学习一:Windows下安装破解JIRA6.3.6
  • 原文地址:https://www.cnblogs.com/bobsoft/p/2714467.html
Copyright © 2011-2022 走看看