Flume 学习记录

1、source,channel,sink的关系

         首先要弄清楚flume架构里三者的关系。

# Bind the source and sink to the channel
a1.sources.r1.channels = c1 c2
a1.sinks.k1.channel = c1
a1.sinks.k2.channel = c2

        如以上配置所示,source的绑定channel,参数是channels,因此source与channel是一对多的关系。

        sink绑定channel,参数是channel,因此一个sink对应一个channel。

注意:一个channel可以有多个sink,但是一个sink只能来源于一个channel。

2、启动flume agent
bin/flume-ng agent -c conf/ -n a1 -f test.conf 
# 如果需要将结果输出到控制台
# -Dflume.root.logger=INFO,console   
bin/flume-ng agent --conf conf/ --name
a1 --conf-file test1.conf 
-Dflume.root.logger=INFO,console

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值