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:

  1. a1.sources = r1
  2. a1.channels = c1 c2 c3
  3. a1.sources.r1.selector.type = replicating
  4. a1.sources.r1.channels = c1 c2 c3
  5. a1.sources.r1.selector.optional = c3

In the above configuration, c3 is an optional channel. Failure to write to c3 issimply ignored. Since c1 and c2 are not marked optional, failure to write tothose channels will cause the transaction to fail.

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:

  1. a1.sources = r1
  2. a1.channels = c1 c2 c3 c4
  3. a1.sources.r1.selector.type = multiplexing
  4. a1.sources.r1.selector.header = state
  5. a1.sources.r1.selector.mapping.CZ = c1
  6. a1.sources.r1.selector.mapping.US = c2 c3
  7. a1.sources.r1.selector.default = c4

Custom Channel Selector

A custom channel selector is your own implementation of the ChannelSelectorinterface. A custom channel selector’s class and its dependencies must beincluded in the agent’s classpath when starting the Flume agent. The type ofthe custom channel selector is its FQCN.

Property NameDefaultDescription
selector.typeThe component type name, needs to be your FQCN

Example for agent named a1 and its source called r1:

  1. a1.sources = r1
  2. a1.channels = c1
  3. a1.sources.r1.selector.type = org.example.MyChannelSelector