Database Reference
In-Depth Information
Replicating Selector
The replicating selector simply takes all inputs and sends them to all
channels for further processing. Because it is the default, no configuration
is necessary, but it may be explicitly defined for a source by setting the
selector.type property to replicating :
agent_1.source.source-1.selector.type = replicating
The only additional option for the replicating selector is the ability to ignore
failures to write to specific channels. To do this, the selector.optional
property is set with a space-separated list of channels to ignore. For
example, this setting makes agent_1 's second channel optional:
agent_1.source.source-1.selector.optional = channel-2
Multiplexing Selector
The other built-in channel selector is the multiplexing selector. This selector
is used to distribute data across different channels depending on the
Event 's header metadata. It is activated by changing the source's
selector.type to be multiplexing:
agent_1.source.source-1.selector.type = multiplexing
By default, the channel is determined from the flume.selector.header
header in the metadata, but it can be changed with the selector.header
property. For example, this changes the selector to use the shorter
timezone header:
agent_1.source.source-1.selector.header = timezone
The multiplexing selector also needs to know how to distribute the values
from this header to the various channels assigned to the source. The target
channel(s) is specified with the selector.mapping property. The values
must be explicitly mapped for each possible value with a default channel
specified with the selector.default property. For example, to map
Pacific Daylight Time (PDT) and Eastern Daylight Time (EDT) to
channel-2 and all other events to channel-1 , the configuration would
look like this:
Search WWH ::




Custom Search