Flume Channel Selector
Flume 基于Channel Selector可以实现扇入、扇出。
同一个数据源分发到不同的目的,如下图。

在source上可以定义channel selector:
|
1
2
3
4
5
6
7
8
9
|
a1.sources=r1...a1.channels=c1 c2...a1.sources.r1.selector.type=multiplexinga1.sources.r1.selector.header=typea1.sources.r1.selector.mapping.type1=c1a1.sources.r1.selector.mapping.type2=c2... |
但是这个type变量从哪里来呢?
解决方法:
1、修改用到的那个source的源码,应用到client端,不同的数据类型添加不同的type
2、在source端配置interceptor,通过interceptor在header上设置变量type
比如:
使用regex_extractor,对传过来的数据进行处理,提取出type值(如果可以的话,可以在client端的数据格式添加type值,方便使用regex_extractor提取出来)。
3、在source端自定义interceptor,在interceptor里对处理变量type
Flume Channel Selector的更多相关文章
- Flume Channel Selectors + kafka
http://flume.apache.org/FlumeUserGuide.html#custom-channel-selector 官方文档上channel selectors 有两种类型: Re ...
- Flume入门——Selector、Chanel等
1.selector (http://blog.csdn.net/looklook5/article/details/40430965) (http://blog.csdn.net/xiao_jun_ ...
- Flume Channel Selectors官网剖析(博主推荐)
不多说,直接上干货! Flume Sources官网剖析(博主推荐) Flume Channels官网剖析(博主推荐) 一切来源于flume官网 http://flume.apache.org/Flu ...
- Flume-Replicating Channel Selector 单数据源多出口
使用 Flume-1 监控文件变动,Flume-1 使用 Replicating Channel Selector 将变动内容传递给 Flume-2,Flume-2 负责存储到 HDFS.同时 Flu ...
- Flume配置Replicating Channel Selector
1 官网内容 上面的配置是r1获取到的内容会同时复制到c1 c2 c3 三个channel里面 2 详细配置信息 # Name the components on this agent a1.sour ...
- Flume配置Multiplexing Channel Selector
1 官网内容 上面配置的是根据不同的heder当中state值走不同的channels,如果是CZ就走c1 如果是US就走c2 c3 其他默认走c4 2 我的详细配置信息 一个监听http端口 然后 ...
- NIO的Buffer&Channel&Selector
java的NIO和AIO Buffer position.limit.capacity 初始化 Buffer 填充 Buffer 提取 Buffer 中的值 mark() & reset() ...
- 一段关于java NIO server端接受客户端socket连接;演示了关于channel,selector等组件的整合使用
public class ReactorDemo { public static void main(String[] args) throws IOException { ServerSocketC ...
- Flume Channel
http://blog.csdn.net/john_f_lau/article/details/20913831 http://dev.cmcm.com/archives/194
随机推荐
- javaScript 物体多形态改变加回调函数
小方块同时改变 width height top left opacity(透明度) 加回调函数 改变第二个方块. 效果如下: <!DOCTYPE html> <html lang ...
- Dispatch Queue 之 dispatch_sync

- 6个免费的C++图形和游戏库
继上一篇,本篇同样出自zoomzum.com,具体可见http://zoomzum.com/6-free-c-graphics-and-game-libraries/,介绍了6个免费的C++图形和游戏 ...
- 线程间通信wait和notify【All】简介
1.通信就是指相互交换一些数据或者发送一些控制指令,比如一个线程给另一个暂停执行的线程发送一个恢复执行的指令. 可变共享变量是天然的通信媒介,也就是说一个线程如果想和另一个线程通信的话,可以修改某个在 ...
- Python——pytessercat识别简单的验证码
什么是验证码 验证码(CAPTCHA)是“Completely Automated Public Turing test to tell Computersand Humans Apart” (全自动 ...
- paperpass
推荐大家一个靠谱的论文检测平台.重复的部分有详细出处以及具体修改意见,能直接在文章上做修改,全部改完一键下载就搞定了.怕麻烦的话,还能用它自带的降重功能.哦对了,他们现在正在做毕业季活动, 赠送很多免 ...
- JavaWeb学习 (二十七)————监听器(Listener)在开发中的应用
监听器在JavaWeb开发中用得比较多,下面说一下监听器(Listener)在开发中的常见应用 一.统计当前在线人数 在JavaWeb应用开发中,有时候我们需要统计当前在线的用户数,此时就可以使用监听 ...
- LINQ 小项目【组合查询、分页】
使用 linq 在网页上对用户信息增删改,组合查询,分页显示 using System; using System.Collections.Generic; using System.Linq; us ...
- 【Java基础】3、Java 位运算(移位、位与、或、异或、非)
public class Test { public static void main(String[] args) { // 1.左移( << ) // 0000 0000 0000 0 ...
- Matlab Euler's method
% matlab script to test efficiency of % Euler's method, classical Runge-Kutta, and ode45 % on Arenst ...