Configuring individual components
After defining the flow, you need to set properties of each source, sink andchannel. This is done in the same hierarchical namespace fashion where you setthe component type and other values for the properties specific to eachcomponent:
- # properties for sources
- <Agent>.sources.<Source>.<someProperty> = <someValue>
- # properties for channels
- <Agent>.channel.<Channel>.<someProperty> = <someValue>
- # properties for sinks
- <Agent>.sources.<Sink>.<someProperty> = <someValue>
The property “type” needs to be set for each component for Flume to understandwhat kind of object it needs to be. Each source, sink and channel type has itsown set of properties required for it to function as intended. All those needto be set as needed. In the previous example, we have a flow fromavro-AppSrv-source to hdfs-Cluster1-sink through the memory channelmem-channel-1. Here’s an example that shows configuration of each of thosecomponents:
- agent_foo.sources = avro-AppSrv-source
- agent_foo.sinks = hdfs-Cluster1-sink
- agent_foo.channels = mem-channel-1
- # set channel for sources, sinks
- # properties of avro-AppSrv-source
- agent_foo.sources.avro-AppSrv-source.type = avro
- agent_foo.sources.avro-AppSrv-source.bind = localhost
- agent_foo.sources.avro-AppSrv-source.port = 10000
- # properties of mem-channel-1
- agent_foo.channels.mem-channel-1.type = memory
- agent_foo.channels.mem-channel-1.capacity = 1000
- agent_foo.channels.mem-channel-1.transactionCapacity = 100
- # properties of hdfs-Cluster1-sink
- agent_foo.sinks.hdfs-Cluster1-sink.type = hdfs
- agent_foo.sinks.hdfs-Cluster1-sink.hdfs.path = hdfs://namenode/flume/webdata
- #...