Getting 'checking flume.conf for changes'

2019-04-01 20:35发布

问题:

I am using Apache Flume 1.4.0 to collect log files (auth.log) and store in HDFS (Hadoop 2.6.0). The command used is:

 bin/flume-ng agent --conf ./conf/ -f flume.conf -Dflume.root.logger=DEBUG,console -n agent

The flume.conf file contains the following:

agent.channels.memory-channel.type = memory

agent.sources.tail-source.type = exec
agent.sources.tail-source.command = tail -F /var/log/auth.log
agent.sources.tail-source.channels = memory-channel

agent.sinks.log-sink.channel = memory-channel
agent.sinks.log-sink.type = logger
agent.sinks.hdfs-sink.channel = memory-channel
agent.sinks.hdfs-sink.type = hdfs
agent.sinks.hdfs-sink.hdfs.path = hdfs://localhost:54310/usr/auth.log
agent.sinks.hdfs-sink.hdfs.fileType = DataStream

agent.channels = memory-channel
agent.sources = tail-source
agent.sinks = log-sink hdfs-sink

After the command is run, the following message keeps repeating in a loop:

(conf-file-poller-0) [DEBUG - org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:126)] Checking file:flume.conf for changes

What could be the reason ?

回答1:

Flume is designed by default to check every 30 seconds (this is hardcoded) the configuration files looking for changes. It that occurs then it re-creates the affected component (source, sink or channel) in order to apply the new configuration. If you want to disable this behaviour, simply start the agent with the --no-reload-conf option.