0
点赞
收藏
分享

微信扫一扫

Flume 组件(source、channel、sink)远程调试


1.创建Maven工程

2.编写所需要自定义组件的代码(以Source为例),打包放到服务器上

Flume 组件(source、channel、sink)远程调试_服务器

3.添加idea Debug 配置

Flume 组件(source、channel、sink)远程调试_hadoop_02


Flume 组件(source、channel、sink)远程调试_服务器_03


Flume 组件(source、channel、sink)远程调试_服务器_04

4.在服务器上广播Debug端口

[atguigu@hadoop102 flume]$ export FLUME_JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"

提示:这里需要将suspend=n,改为suspend=y.

5.启动Flume 程序,测试连接

[atguigu@hadoop102 flume ]$ flume-ng agent -c conf/ -f jobs/mysource.conf -n a1 -Dflume.root.logger=INFO,console

Flume 组件(source、channel、sink)远程调试_hadoop_05

6.进入Idea 进行Debug操作

Flume 组件(source、channel、sink)远程调试_服务器_06

7.取消端口的广播

[atguigu@hadoop102 flume]$ export  -n FLUME_JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"


举报

相关推荐

0 条评论