复用信道选择器的Flume使用

ahy6op9u  于 2021-06-03  发布在  Flume
关注(0)|答案(1)|浏览(334)

我正在尝试实现flume来接收1tb左右的数据。为此,我试图使用多路复用通道选择器。
下面有一些示例演示如何使用多路复用通道选择器。

我的问题是如何确定事件的标题内容

例如,在下面的配置中,我使用以报头作为状态的多路复用信道选择器,并Map到cn、id、in等。

spoolDirAgent.sources.source1.selector.type = multiplexing
spoolDirAgent.sources.source1.selector.header = State
spoolDirAgent.sources.source1.selector.mapping.CN = channel1
spoolDirAgent.sources.source1.selector.mapping.IN = channel2
spoolDirAgent.sources.source1.selector.mapping.ID = channel2
spoolDirAgent.sources.source1.selector.defalut = channel1

如果可能,请让我知道如何使用flume源中的事件头?
提前谢谢!

vkc1a9a2

vkc1a9a21#

如flume ng用户指南所示,如果事件头不包含键“state”,那么将使用默认通道。并在flume ng用户指南中搜索“static interceptor”,那么您或多或少就会知道如何将键“state”添加到标题中。

相关问题