title: Stopping Flume Agent
body: <p>I have a requirement where I want to run Flume agent with spooling directory as source. After all the files from the spool directory is copied to HDFS(sink) I want the agent to stop as I know all the files are pushed to channel.
  Also I want to run this steps for different spooling directories each time and stop the agent when all files from the directory are marked as .COMPLETED.
  Is there any way to stop the flume agent?</p>