apache - 并行读取 Flume spoolDir

标签 apache flume flume-ng

由于我不允许在生产服务器上设置 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/

相关文章:

ruby - Flume - 单个代理的多个接收器和 channel

hadoop - 需要帮助使用flume调试kafka源到hdfs sink

php wamp; www 中的禁止文件夹

reactjs - React-router 键入 url 并在 tomcat 上刷新,elastic beanstalk

hadoop - 将Facebook帖子提取到Hdfs中

hadoop - 编写水槽拦截器以从安慰中获取数据

reactjs - 如何使用 javascript fetch API 发送授权、cookie header

java - 如何使用 Apache POI 获取正确的单元格

hadoop - 使用Flume在HDFS中获取Twitter数据时出现问题