嵌入式ARM体系结构及Bootloader开发-郄晓烨-专题视频课程

立即学习:https://edu.csdn.net/course/play/8876/183493

 

 

主机戳拦截器:向event header中,增加主机名信息

 

a1.sources = r1

a1.sinks = k1

a1.channles = c1

 

a1.sources.r1.type = spooldir

a1.sources.r1.spoolDir = /root/flumeInter

a1.sources.r1.interceptors = i1 i2

a1.sources.r1.interceptors.i1.preserveExisting = false

a1.sources.r1.interceptors.i1.type = timestamp

a1.sources.r1.interceptors.i2.type = host

a1.sources.r1.interceptors.i2.hostHeader = host

a1.sources.r1.interceptors.i2.useIP = false

 

a1.sink.k1.type = logger

 

a1.channels.c1.type = memory

a1.channels.c1.capacity = 1000

a1.channels.c1.transactionCapacity = 100

a1.sources.r1.channels = c1

a1.sinks.k1.channel= c1

 

flume-ng agent -n a1 -c /opt/software/apache-flume-1.6.0-cdh5.14.0-bin/flumeconf -f hostInter.conf -Dflume.root.logger=INFO,console

 

 

正则拦截器:

 

a1.sources = r1

a1.sinks = k1

a1.channels = c1

a1.sources.r1.type = spooldir

a1.sources.r1.spoolDir = /root/flumeData

a1.sources.r1.interceptors = i1

a1.sources.r1.interceptors.i1.type = regex_filter

a1.sources.r1.interceptors.i1.regex = ^[0-9]*$

a1.sources.r1.interceptors.i1.excludeEvents = true

 

a1.sinks.k1.type = hdfs

a1.sinks.k1.hdfs.path = hdfs://hadoop111:9000/flume/regex

a1.sinks.k1.hdfs.fileType = DataStream

a1.channels.c1.type = memory

a1.channels.c1.capacity = 1000

a1.channels.c1.transactionCapacity = 100

a1.sources.r1.channels = c1

a1.sinks.k1.channel = c1

 

 

注意:sink 连接 channel  是  channel

           source 连接 channel 是 channels

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值