本篇內(nèi)容主要講解“spark streaming中ratecontroller是什么”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實用性強(qiáng)。下面就讓小編來帶大家學(xué)習(xí)“spark streaming中ratecontroller是什么”吧!
spark streaming中采用的模型如下,基本思想是按照100ms的批次發(fā)送數(shù)據(jù)給controller,剛開始controller直接轉(zhuǎn)給jobgenerator,jobgenerator在生成job,交給jobprocessor來處理,jobprocessor將job統(tǒng)計信息發(fā)送給controller,controller接收到統(tǒng)計信息,會動態(tài)改變batch size來給job發(fā)送數(shù)據(jù)。
ratecontroller的子類有receiverratecontroller、directkafkaratecontroller。
receiverratecontroller會向receivertracker發(fā)送updatereceiverratelimit消息。
receivertracker接收到updatereceiverratelimit消息后,向receiversupervisorimpl轉(zhuǎn)發(fā)updateratelimit消息。
receiversupervisorimpl接收到updateratelimit消息后,調(diào)用blockgenerator的updaterate方法,來控制數(shù)據(jù)的接收速度。
blockgenerator繼承自ratelimiter。
到此,相信大家對“spark streaming中ratecontroller是什么”有了更深的了解,不妨來實際操作一番吧!這里是箭頭云網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!