从CDH4 jar文件构建Hadoop Ecplise库 [英] Build a Hadoop Ecplise Library from CDH4 jar files

查看:129
本文介绍了从CDH4 jar文件构建Hadoop Ecplise库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建一个Hadoop库,包含我需要在Eclipse中构建map / reduce作业所需的所有jar文件。



什么是我需要的.jar文件,以及在Ubuntu上安装Hadoop时单个节点安装CDH4的文件夹?


<假设你已经从 https://ccp.cloudera.com/display/SUPPORT/CDH4+Downloadable+Tarballs


  1. 解开压缩包

  2. 在解压后的目录中找到 build.properties 文件:



    hadoop-2.0.0-cdh4.0.0 / src / hadoop-mapreduce-project / src / contrib / eclipse-plugin


  3. 在您的eclipse安装目录中为此文件添加一个属性:
    $ b

    eclipse.home = / opt / eclipse / jee-indigo-SR2


  4. 最后运行 ant hadoop-2.0.0-cdh4.0.0 / src / hadoop-mapreduce-project 目录构建jar

现在,您将在 hadoop-2.0.0-cdh4.0.0 / src / hadoop-mapreduce-project / build / contrib / eclipse-plugin / b
$ b

为了最终回答你的问题,依赖关系的罐子现在在:


  • hadoop-2.0.0-cdh4.0.0 / src / hadoop-mapreduce-project / build / contrib / eclipse-plugin /



如果您需要列表,请仔细阅读这篇 pastebin


I am trying to build a Hadoop library of all the jar files that I need to a build map/reduce job in Eclipse.

What are the .jar files that I need AND from what folders of the single node install of CDH4 when installed Hadoop on Ubuntu?

解决方案

Assuming you've downloaded the CDH4 tarball distro from https://ccp.cloudera.com/display/SUPPORT/CDH4+Downloadable+Tarballs

  1. Unpack the tarball
  2. locate the build.properties file in the unpacked directory:

    hadoop-2.0.0-cdh4.0.0/src/hadoop-mapreduce-project/src/contrib/eclipse-plugin

  3. Add a property to this file for your eclipse installation directory:

    eclipse.home=/opt/eclipse/jee-indigo-SR2

  4. Finally run ant from the hadoop-2.0.0-cdh4.0.0/src/hadoop-mapreduce-project directory to build the jar

You'll now have a jar in the hadoop-2.0.0-cdh4.0.0/src/hadoop-mapreduce-project/build/contrib/eclipse-plugin/ folder

To finally answer your question, the dependency jars are now in:

  • hadoop-2.0.0-cdh4.0.0/src/hadoop-mapreduce-project/build/contrib/eclipse-plugin/

And to be really verbose if you want the list, see this pastebin

这篇关于从CDH4 jar文件构建Hadoop Ecplise库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆