不多说,直接上干货!
Flume Sources官网剖析(博主推荐)
Flume Channels官网剖析(博主推荐)
Flume Channel Selectors官网剖析(博主推荐)
Flume Sinks官网剖析(博主推荐)
Flume Sink Processors官网剖析(博主推荐)
Event Serializers官网剖析(博主推荐)
一切来源于flume官网
http://flume.apache.org/FlumeUserGuide.html
- Timestamp Interceptor
- Host Interceptor
- Static Interceptor
- UUID Interceptor
- Morphline Interceptor
- Search and Replace Interceptor
- Regex Filtering Interceptor
- Regex Extractor Interceptor
- Example 1:
- Example 2:
Timestamp Interceptor
Host Interceptor
Static Interceptor
UUID Interceptor
Morphline Interceptor(常用)
官网提供给我们的参考案例是
a1.sources.avroSrc.interceptors = morphlineinterceptor
a1.sources.avroSrc.interceptors.morphlineinterceptor.type = org.apache.flume.sink.solr.morphline.MorphlineInterceptor$Builder
a1.sources.avroSrc.interceptors.morphlineinterceptor.morphlineFile = /etc/flume-ng/conf/morphline.conf
a1.sources.avroSrc.interceptors.morphlineinterceptor.morphlineId = morphline1
我们一般是
a1.sources.r1.interceptors = i1
a1.sources.r1.interceptors.i1.type = com.zhouls.flume.interceptor.BehaviorIterceptor$BehaviorIterceptorBuilder
这里是我自己写的一个拦截器代码。
Search and Replace Interceptor
Regex Filtering Interceptor
Regex Extractor Interceptor
大家自己去看,罗列出来,是让大家,不要局限于博客本身,眼光要放宽和多看官网,一切来源于官网。
对于大数据无论是各种开源项目,看官网是学习的最好办法,再加上他人的中文博客。不要觉得英文恐惧,专业英语也就那样!变成高手和大牛,加油吧,zhouls!