Flume Channel Selectors
如果未指定类型,则默认为“replicating”。
Replicating Channel Selector (default)
必需属性以粗体显示。
Property Name |
Default |
Description |
selector.type |
replicating |
组件类型名称replicating |
selector.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
在上面的配置中,c3是可选通道。 无法写入c3会被简单的忽略了。 由于c1和c2未标记为可选,因此无法写入这些通道将导致事务失败。
Multiplexing Channel Selector
必需属性以粗体显示。
Property Name |
Default |
Description |
selector.type |
replicating |
The component type name, needs to be multiplexing |
selector.header |
flume.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
Custom Channel Selector
自定义通道选择器需要实现ChannelSelector接口。 启动Flume代理时,自定义通道选择器的类及其依赖项必须包含在代理程序的类路径中。 自定义通道选择器的类型是其FQCN。
Property Name |
Default |
Description |
selector.type |
– |
The component type name, needs to be your FQCN |
Example for agent named a1 and its source called r1:
a1.sources = r1
a1.channels = c1
a1.sources.r1.selector.type = org.example.MyChannelSelector