设为首页 加入收藏

TOP

Flume (五) Channel Selectors
2019-05-03 14:09:29 】 浏览:79
Tags:Flume Channel Selectors

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
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Flume案例:实时采集python爬取的.. 下一篇flume修改sqlsource以针对时间戳..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目