# The configuration file needs to define the sources,# the channels and the sinks.# Sources, channels and sinks are defined per agent,# in this case called 'agent'agent.sources = seqGenSrc
agent.channels = memoryChannel
agent.sinks = loggerSink
# For each one of the sources, the type is definedagent.sources.seqGenSrc.type = seq
# The channel can be defined as follows.agent.sources.seqGenSrc.channels = memoryChannel
# Each sink's type must be definedagent.sinks.loggerSink.type = logger
#Specify the channel the sink should useagent.sinks.loggerSink.channel = memoryChannel
# Each channel's type is defined.agent.channels.memoryChannel.type = memory
# Other config values specific to each type of channel(sink or source)# can be defined as well# In this case, it specifies the capacity of the memory channelagent.channels.memoryChannel.capacity =100
With agent1’s sink set to file_roll, files pile up like below.
The interval can be adjusted with the sink.rollInterval property. (Below is with 30 seconds.)
1
2
3
4
5
6
7
8
9
10
gimjonghuiui-MacBook-Pro:flume paper$ ls -l
total 24-rw-r--r-- 1 paper wheel 01029 15:40 1446100807777-1
-rw-r--r-- 1 paper wheel 951029 15:40 1446100818312-1
-rw-r--r-- 1 paper wheel 5191029 15:41 1446100818312-2
-rw-r--r-- 1 paper wheel 01029 15:41 1446100818312-3
-rw-r--r-- 1 paper wheel 3781029 15:42 1446100818312-4
-rw-r--r-- 1 paper wheel 01029 15:42 1446100818312-5
-rw-r--r-- 1 paper wheel 01029 15:42 1446100818312-6
-rw-r--r-- 1 paper wheel 01029 15:43 1446100818312-7