Flume Selectors

Flume Channel Selectors

If the type is not specified, then defaults to “replicating”.
如果未指定类型,则默认为“复制”。

Replicating Channel Selector (default)

Required properties are in bold.

Property NameDefaultDescription
selector.typereplicatingThe component type name, needs to be replicating
selector.optionalSet of channels to be marked as optional

Example for agent named a1 and it’s source called r1:

a1.sources = r1
a1.channels = c1 c2 c3
a1.sources.r1.selector.type = replicating
a1.sources.r1.channels = c1 c2 c3
a1.sources.r1.selector.optional = c3

In the above configuration, c3 is an optional channel. Failure to write to c3 is simply ignored. Since c1 and c2 are not marked optional, failure to write to those channels will cause the transaction to fail.
在上面的配置中,c3是可选的通道。 无法写入c3只是被忽略了。 由于c1和c2未标记为可选,因此无法写入这些通道将导致事务失败。

Multiplexing Channel Selector

Required properties are in bold.

Property NameDefaultDescription
selector.typereplicatingThe component type name, needs to be multiplexing
selector.headerflume.selector.header
selector.default
selector.mapping.*

Example for agent named a1 and it’s source called r1:

a1.sources = r1
a1.channels = c1 c2 c3 c4
a1.sources.r1.selector.type = multiplexing
a1.sources.r1.selector.header = state
a1.sources.r1.selector.mapping.CZ = c1
a1.sources.r1.selector.mapping.US = c2 c3
a1.sources.r1.selector.default = c4

根据event的header中state的值来确定扇出到哪一个channel

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值