首页 > 其他分享 >Flume 组件(source、channel、sink)远程调试

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

时间:2023-02-01 10:07:28浏览次数:42  
标签:Flume flume suspend agentlib source sink atguigu Debug hadoop102


1.创建Maven工程

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

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

3.添加idea Debug 配置

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


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


Flume 组件(source、channel、sink)远程调试_intellij idea_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)远程调试_服务器_05

6.进入Idea 进行Debug操作

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

7.取消端口的广播

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


标签:Flume,flume,suspend,agentlib,source,sink,atguigu,Debug,hadoop102
From: https://blog.51cto.com/u_14389461/6030661

相关文章