Flume 学习笔记(3) 可靠性保证

flume保证只要agent还可以运行,所有被agent接收到的数据都会被发送到collector,flume提供了三种级别的可靠性保证:

  • End-to-end
  • Store on failure
  • Best effort
end-to-end保证只要agent正常的接收完event且一直运行,agent就会把接收到的event送到终点。agent会把接收到的event先写在磁盘上,当event成功发送到终点后返回确认信息,然后agent才会删除本地磁盘上的event。agent会一直尝试下去直到发送成功。

store on failure如果数据发送失败,数据发送方(agent、collector)会先把数据保存在本地磁盘上直到下游节点被修复,或者发送到其他可选择的目标节点上。与end-to-end不同的是,store on failure可能会由于组件出错或其他一些错误导致数据丢失。

best-effort不做任何QoS保证。如果node失败,任何正在传输过程中的数据会丢失。是最弱的一种可靠性保证,但也是最轻量级的。

三种级别的可靠性保证通过使用以下三种sink实现:

agentE2ESink[("machine"[,port])]
End to end. This version uses the WAL, relies on an acknowledgement, and will retry if no acknowledgement is received.

agentDFOSink[("machine"[,port])]
Disk Failover (store on failure). This agent writes to disk only if it can detect a failure on the collector. If any data is stored to disk, it periodically retires the network connection and attempts to resend.

agentBESink[("machine"[,port])]
Best Effort. This agent does not write to disk at all, and drops messages in the event of collector failures.

 agentSink 是 agentE2ESink的别名。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值