由于我不允许在生产服务器上设置 Flume,我必须下载日志,将它们放在 Flume spoolDir 中,并有一个接收器可以从 channel 中使用并写入 Cassandra。一切正常。
但是,由于我在 spoolDir 中有很多日志文件,而当前设置一次只处理 1 个文件,因此需要一段时间。我希望能够同时处理多个文件。我想到的一种方法是使用 spoolDir 但将文件分发到 5-10 个不同的目录中,并定义多个源/ channel /接收器,但这有点笨拙。有没有更好的方法来实现这一点?
谢谢
最佳答案
仅作记录,这已在 Flume 的邮件列表中得到回答:
Hari Shreedharan 写道:
Unfortunately, no. The spoolDir source was kept single-threaded so that deserializer implementations can be kept simple. The approach with mutliple spoolDir sources is the correct one, though they can all write to the same channel(s) - so you'd need only a larger number of sources, they can all share the same channel(s) and you don't need more sinks unless you want to pull data out faster.
http://mail-archives.apache.org/mod_mbox/flume-user/201409.mbox/browser
关于apache - 并行读取 Flume spoolDir,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25875574/