We already played with starting Flume Agent in Chapter 1. Let's look at different options available.
Flume Agent needs certain parameters to configure itself, which are passed from the command line.
Lets see again how we started the Flume agent
$ bin/flume-ng agent -n agent-name -c conf -f path/to/conf-file
The initialization process is handled by org.apache.flume.node.Application class.
Following options are available
- n or name - Name of Agent
- f or conf-file - configuration file
- no-reload-conf - if present, configuration is not reloaded on config file changes
- h or help - for help
name and conf-file options are mandatory
If no-reload-conf is specified, the configuration file updates are ignored, else if the configuration file is updated, the Flume Agent is reconfigured with updated settings.
We already looked at configuration file format. Following is a sample configuration file
a1.sources = r1 a1.sinks = k1 a1.channels = c1 a1.sources.r1.type = avro a1.sources.r1.bind = 0.0.0.0 a1.sources.r1.port = 4141 a1.sinks.k1.type = logger a1.channels.c1.type = memory a1.sources.r1.channels = c1 a1.sinks.k1.channel = c1