温馨提示  2024年 6月我们已经停止开发者板块文章内容更新,谢谢来访。存档数据
知识 2023-08-27 31 次阅读

spark streaming中ratecontroller是什么

   

本篇内容主要讲解“spark streaming中ratecontroller是什么”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“spark streaming中ratecontroller是什么”吧!

spark streaming中使用的模型如下,基本思想是按照100ms的批次发送数据给controller,刚开始controller直接转给jobgenerator,jobgenerator在生成job,交给jobprocessor来处理,jobprocessor将job统计信息发送给controller,controller接收到统计信息,会动态改变batch size来给job发送数据。

ratecontroller的子类有receiverratecontroller、directkafkaratecontroller。

receiverratecontroller会向receivertracker发送updatereceiverratelimit消息。

    receivertracker接收到updatereceiverratelimit消息后,向receiversupervisorimpl转发updateratelimit消息。

    receiversupervisorimpl接收到updateratelimit消息后,调用blockgenerator的updaterate方法,来控制数据的接收速度。

    blockgenerator继承自ratelimiter。

到此,相信大家对“spark streaming中ratecontroller是什么”有了更深的了解,不妨来实际操作一番吧!这里是云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!