flume agents topology

  Apache Flume is a distributed, reliable, and available system for efficiently collecting, aggregating and moving large amounts of log data from many different sources to a centralized data store.

 Flume Transcation (事务)

  Channel 中的数据只有在被Sink 端消费(也就是数据传输到下一个Agent或写入到文件后)才会在Channel中删除相应数据。

  从soucrce到channel:一旦事务中所有的事件全部传递到channel且提交成功,那么source就将该文件标记为完成。

  从channel到sink:如果下游事件没有被正常消费,那么事务将会回滚;且所有的事件都会保持到channel中,等待重新传递。

 Flume Interceptor(拦截器)

  Timestamp Interceptor: 时间戳拦截器,将当前时间戳(毫秒)加入到events header中,key名字为:timestamp,值为当前时间戳。

  Host Interceptor: 主机名拦截器。将运行Flume agent的主机名或者IP地址加入到events header中,key名字为:host(也可自定义)。

  Static Interceptor: 静态拦截器,用于在events header中加入一组静态的key和value。

  UUID Interceptor: UUID拦截器,用于在每个events header中生成一个UUID字符串

  Regex Filtering Interceptor:

  Regex Extractor Interceptor:

 Flume Channel Selectors

  Replicating(复制)同一个Event会发送给每一个Channel 中,默认使用;

  Multiplexing(复用)同一个Event只会选择多个Channel中的一个发送

  自定义Selectors

猜你喜欢

转载自www.cnblogs.com/mrerror/p/10855772.html
今日推荐