Ubuntu 搭建Hadoop源码阅读环境

本文介绍了在Ubuntu系统中如何搭建Hadoop源码阅读环境,包括JDK和Eclipse的安装,Ant的配置,以及Hadoop Eclipse插件的编译与安装。在调试部分,详细阐述了启动Hadoop调试模式,设置Run Configuration参数,以及如何调试JobTracker。此外,还提到了查看和修改Hadoop日志级别的多种方法。
摘要由CSDN通过智能技术生成

JDK,Eclipse的安装请参考:Ubuntu 安装 搭建 J2EE 开发环境

Ant安装:

    下载ant:http://ant.apache.org/bindownload.cgi

    解压Ant:

    tar -xvzf apache-ant-1.9.2-bin.tar.gz 
    移动重命名:

  mv apache-ant-1.9.2/ ~/opt/
  mv apache-ant-1.9.2/ ant
    配置环境变量,添加ANT_HOME,和$ANT_HOME/bin:

    sudo vim /etc/profile

  .......................
   export ANT_HOME=/opt/ant
   export PATH=$PATH:$ANT_HOME/bin
 .......................

   source /etc/profile

   测试是否生效:

 ant -version
Apache Ant(TM) version 1.9.2 compiled on July 8 2013

Hadoop Eclipse 插件安装:

Hadoop的eclipse插件需要自行安装编译,也很简单,用ant进行编译打包

cd /opt/hadoop-1.2.1/src/contrib/eclipse-plugin

参考这篇文章:http://qindongliang1922.iteye.com/blog/1972641

此处贴出build.xml全部和META-INFO改动的:

build.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>  

<!--  
Licensed to the Apache Software Foundation (ASF) under one or more  
contributor license agreements.  See the NOTICE file distributed with  
this work for additional information regarding copyright ownership.  
The ASF licenses this file to You 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 
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值