Database Reference
In-Depth Information
file. For example, defining a properties file with two agents might look
something like this:
agent_1.sources= source-1
agent_1.channels= channel-1 channel-2
agent_1.sinks= sink-1 sink-2
agent_2.sources= source-1
agent_2.channels= channel-1
agent_2.sinks= sink-1
In this example, the two agents are configured to each have a single source.
The first agent, agent_1 , uses two channels and two sinks to either
replicate or multiplex its input. The second agent, agent_2 , is more simply
defined with a single channel and sink.
Note that the source, channel, and sink names do not need to be unique
across different agents. The configuration is always with respect to an agent
definition.
The next section binds the sources and the sinks for each agent to their
appropriate channels. The source is bound with properties of the form
<agent name>.sources.<source>.channels , and the sink is bound
to each channel with <agent name>.sinks.<sink>.channel . In this
example, the source is bound to all channel(s) and the sink(s) are bound to
the channel with the same name:
agent_1.sources.source-1.channels= channel-1 channel-2
agent_1.sinks.sink-1.channel= channel-1
agent_1.sinks.sink-2.channel= channel-2
agent_2.sources.source-1.channels= channel-1
agent_2.sinks.sink-1.channel= channel-1
The Flume Data Model
Before continuing with the configuration of a Flume agent, some discussion
of the Flume internal data model is required. This data model is defined by
the Event data structure. The interface to this structure is defined by Flume
as follows:
package org.apache.flume;
import java.util.Map;
Search WWH ::




Custom Search