介绍
Flume中的拦截器(interceptor),在 Source 端,读取 events 发送到 Sink 的时候,可以在 events header 中 加入 一些有用的信息,或者对 events 的内容进行 过滤,完成初步的 数据清洗。
Flume 1.9中提供以下拦截器:
- Timestamp Interceptor : 时间戳添加拦截器
- Host Interceptor : Host添加拦截器
- Static Interceptor : 静态属性写入拦截器
- Remove Header Interceptor : 删除属性拦截器
- UUID Interceptor : 添加唯一ID拦截器
- Morphline Interceptor : Morphline 实时清洗拦截器
- Search and Replace Interceptor : 查找-替换拦截器
- Regex Filtering Interceptor : 正则过滤拦截器
- Regex Extractor Interceptor : 正则提取拦截器
官网:
https://flume.apache.org/releases/content/1.9.0/FlumeUserGuide.html#flume-interceptors
使用方式参见:
http://lxw1234.com/archives/2015/11/543.htm
http://lxw1234.com/archives/2015/11/545.htm
https://blog.csdn.net/weixin_45764675/article/details/106465142