下载源码
git clone https://github.com/apache/flume.git
将源码导入Idea

编译时会有以下jar仓库中无法找到并下载,需要手动下载到本地仓库
| 1 | linq4j-0.4.jar pentaho-aggdesigner-algorithm-5.1.3-jhyde.jar quidem-0.1.1.jar | 
以上jar文件可以在下面的网站中找到
| 1 | http://conjars.org/repo/ | 
执行下面的命令将jar下载到本地仓库
| 1 | mvn install:install-file -Dfile=pentaho-aggdesigner-algorithm-5.1.3-jhyde.jar -DgroupId=org.pentaho -DartifactId=pentaho-aggdesigner-algorithm -Dversion=5.1.3-jhyde -Dpackaging=jar | 
执行编译命令
| 1 | mvn clean install -DskipTests | 

本地调试
| 1 | 主类:org.apache.flume.node.Application | 
flume-conf.properties
| 1 | # Name the components on this agent | 

运行效果
远程调试
在conf/flume-env.properties增加以下配置,然后启动flume
| 1 | -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 | 
在idea中启动远程调试
 
   
        