国产亚洲精品福利在线无卡一,国产精久久一区二区三区,亚洲精品无码国模,精品久久久久久无码专区不卡

當(dāng)前位置: 首頁(yè) > news >正文

房?jī)r(jià)走勢(shì)最新消息2022aso優(yōu)化運(yùn)營(yíng)

房?jī)r(jià)走勢(shì)最新消息2022,aso優(yōu)化運(yùn)營(yíng),政府投資類網(wǎng)站建設(shè)單位,網(wǎng)站開(kāi)發(fā)貼吧ResourceManager 總結(jié) 一、概述 1、ResourceManager 管理 Flink 集群中的計(jì)算資源,計(jì)算資源主要來(lái)自 TaskManager 組件。 2、如果集群采用 Native【本地模式】部署,則 ResourceManager 會(huì)動(dòng)態(tài)地向集群資源管理器申請(qǐng) Container 并啟動(dòng)TaskManager&…
ResourceManager 總結(jié)
一、概述
1、ResourceManager 管理 Flink 集群中的計(jì)算資源,計(jì)算資源主要來(lái)自 TaskManager 組件。

2、如果集群采用 Native【本地模式】部署,則 ResourceManager 會(huì)動(dòng)態(tài)地向集群資源管理器申請(qǐng) Container 并啟動(dòng)TaskManager,例如Hadoop Yarn、Kubernetes等。

3、ResourceManager主要接收來(lái)自 JobManager 的 SlotRequest 和 TaskManager 的 SlotReport。
二、分類
1、動(dòng)態(tài)資源管理 和 不支持動(dòng)態(tài)資源管理
1)一類支持動(dòng)態(tài)資源管理,例如KubernetesResourceManager、YarnResourceManager及MesosResourceManager

支持動(dòng)態(tài)資源管理的集群類型,可以按需啟動(dòng)TaskManager資源,根據(jù)Job所需的資源請(qǐng)求,動(dòng)態(tài)啟動(dòng)TaskManager節(jié)點(diǎn),這種資源管理方式不用擔(dān)心資源浪費(fèi)和資源動(dòng)態(tài)伸縮的問(wèn)題。

實(shí)現(xiàn)動(dòng)態(tài)資源管理的ResourceManager需要繼承ActiveResourceManager基本實(shí)現(xiàn)類。

2)另一類不支持動(dòng)態(tài)資源管理,例如StandaloneResourceManager
2、分類圖

在這里插入圖片描述

三、核心服務(wù)

ResourceManagerRuntimeServices 中包含 SlotManager 和 JobLeaderldService 兩個(gè)主要服務(wù)和 HeartbeatService 心跳服務(wù)。

1、SlotManager 管理整個(gè)集群的 Slot 計(jì)算資源,并對(duì) Slot 計(jì)算資源進(jìn)行統(tǒng)一的分配和管理,同時(shí)實(shí)現(xiàn)了對(duì) TaskManager 信息的注冊(cè)和管理。
2、JobLeaderldService 通過(guò)實(shí)現(xiàn) jobLeaderldListeners 實(shí)時(shí)監(jiān)聽(tīng) JobManager 的運(yùn)行狀態(tài),以獲取集群?jiǎn)?dòng)的作業(yè)對(duì)應(yīng)的 JobLeaderld 信息,防止出現(xiàn) JobManager 無(wú)法連接的情況,用于管理注冊(cè)的 JobManager 節(jié)點(diǎn),包括對(duì) JobManager 的注冊(cè)和注銷等操作。
3、HeartbeatService 主要通過(guò) TaskManagerHeartbeatListener 和 JobManagerHeartbeatListener 兩個(gè)監(jiān)聽(tīng)器收集來(lái)自 TaskManager和 JobManager 的心跳信息,以保證整個(gè)運(yùn)行時(shí)中各個(gè)組件之間能夠正常通信。
四、ResourceManager 的初始化和啟動(dòng)
DefaultDispatcherResourceManagerComponentFactory#create 方法
1、初始化 ResourceManager
 resourceManager =resourceManagerFactory.createResourceManager(configuration,ResourceID.generate(),rpcService,highAvailabilityServices,heartbeatServices,fatalErrorHandler,new ClusterInformation(hostname, blobServer.getPort()),webMonitorEndpoint.getRestBaseUrl(),metricRegistry,hostname,ioExecutor);
1)創(chuàng)建 ResourceManagerRuntimeServices
1.創(chuàng)建 SlotManager

SlotMatchingStrategy 根據(jù)作業(yè)中給定的 ResourceProfile 匹配 Slot 計(jì)算資源。SlotMatchingStrategy主要分為兩種類型:

一種是LeastUtilizationSlotMatchingStrategy,即按照利用率最低原則匹配Slot資源,盡可能保證TaskExecutor上資源的使用率處于比較低的水平,這種策略能夠有效降低機(jī)器的負(fù)載。

另一種是AnyMatchingSlotMatchingStrategy,即直接返回第一個(gè)匹配的Slot資源策略。

private static SlotManager createSlotManager(ResourceManagerRuntimeServicesConfiguration configuration,ScheduledExecutor scheduledExecutor,SlotManagerMetricGroup slotManagerMetricGroup) {final SlotManagerConfiguration slotManagerConfiguration =configuration.getSlotManagerConfiguration();if (configuration.isEnableFineGrainedResourceManagement()) {return new FineGrainedSlotManager(scheduledExecutor,slotManagerConfiguration,slotManagerMetricGroup,new DefaultResourceTracker(),new FineGrainedTaskManagerTracker(),new DefaultSlotStatusSyncer(slotManagerConfiguration.getTaskManagerRequestTimeout()),new DefaultResourceAllocationStrategy(SlotManagerUtils.generateTaskManagerTotalResourceProfile(slotManagerConfiguration.getDefaultWorkerResourceSpec()),slotManagerConfiguration.getNumSlotsPerWorker()),Time.milliseconds(REQUIREMENTS_CHECK_DELAY_MS));} else if (configuration.isDeclarativeResourceManagementEnabled()) {return new DeclarativeSlotManager(scheduledExecutor,slotManagerConfiguration,slotManagerMetricGroup,new DefaultResourceTracker(),new DefaultSlotTracker());} else {return new SlotManagerImpl(scheduledExecutor, slotManagerConfiguration, slotManagerMetricGroup);}}
2.創(chuàng)建 JobLeaderIdService
final JobLeaderIdService jobLeaderIdService =new DefaultJobLeaderIdService(highAvailabilityServices, scheduledExecutor, configuration.getJobTimeout());
2)返回創(chuàng)建的 StandaloneResourceManager
return new StandaloneResourceManager(rpcService,resourceId,highAvailabilityServices,heartbeatServices,resourceManagerRuntimeServices.getSlotManager(),ResourceManagerPartitionTrackerImpl::new,resourceManagerRuntimeServices.getJobLeaderIdService(),clusterInformation,fatalErrorHandler,resourceManagerMetricGroup,standaloneClusterStartupPeriodTime,AkkaUtils.getTimeoutAsTime(configuration),ioExecutor);

在 StandaloneResourceManager 構(gòu)造方法中啟動(dòng) RpcServer

this.rpcServer = rpcService.startServer(this);
2、啟動(dòng) ResourceManager
resourceManager.start()->ResourceManager#onStart

ResourceManager#startResourceManagerServices

1)獲取 leaderElectionService
leaderElectionService =highAvailabilityServices.getResourceManagerLeaderElectionService();
2)初始化 resourceManagerDriver【ActiveResourceManager需要】
resourceManagerDriver.initialize(this, new GatewayMainThreadExecutor(), ioExecutor);
3)啟動(dòng) leader 競(jìng)選,在 leader 節(jié)點(diǎn)啟動(dòng)服務(wù)
1.啟動(dòng)心跳服務(wù)

在ResourceManager中HeartbeatService的啟動(dòng)方法中,包括了對(duì)taskManagerHeartbeatManager和jobManagerHeartbeatManager兩個(gè)心跳管理服務(wù)的啟動(dòng)操作。

而心跳管理服務(wù)主要通過(guò)TaskManagerHeartbeatListener和JobManagerHeartbeatListener兩個(gè)監(jiān)聽(tīng)器收集來(lái)自TaskManager和JobManager的心跳信息,以保證整個(gè)運(yùn)行時(shí)中各個(gè)組件之間能夠正常通信。

startHeartbeatServices();
2.啟動(dòng) slotManager 服務(wù)

通過(guò)scheduledExecutor線程池啟動(dòng)TaskManager周期性超時(shí)檢查服務(wù),通過(guò)checkTaskManagerTimeouts()方法實(shí)現(xiàn)該檢查,防止TaskManager長(zhǎng)時(shí)間掉線等問(wèn)題。

啟動(dòng)單獨(dú)的線程對(duì)提交的SlotRequest進(jìn)行周期性超時(shí)檢查,防止Slot請(qǐng)求超時(shí)。

slotManager.start(getFencingToken(), getMainThreadExecutor(), new ResourceActionsImpl());
4)啟動(dòng) jobLeaderIdService
jobLeaderIdService.start(new JobLeaderIdActionsImpl());
五、總結(jié)
1、ResourceManager 通過(guò) SlotManager 管理集群中的計(jì)算資源(TaskManager 的 SlotReport)響應(yīng) JobManager 的 SlotRequest;
2、ResourceManager 通過(guò) HeartBeatService 監(jiān)聽(tīng) JobManager 和 TaskManager 的心跳,保證運(yùn)行時(shí)各個(gè)組件間能夠正常通信;
3、ResourceManager 通過(guò) JobLeaderldService 管理注冊(cè)的 JobManager 節(jié)點(diǎn),包括對(duì) JobManager 的注冊(cè)和注銷等操作;
http://m.aloenet.com.cn/news/35407.html

相關(guān)文章:

  • 公司做網(wǎng)站的費(fèi)用怎么做賬百度權(quán)重劃分等級(jí)
  • 網(wǎng)站模版保護(hù)域名跳轉(zhuǎn)長(zhǎng)沙seo優(yōu)化服務(wù)
  • 黃頁(yè)網(wǎng)站大全通俗易懂免費(fèi)域名注冊(cè)永久
  • 展覽公司網(wǎng)站建設(shè)方案百度seo可能消失
  • 免費(fèi)建立平臺(tái)網(wǎng)站關(guān)系營(yíng)銷案例
  • 北京企業(yè)網(wǎng)站設(shè)計(jì)公司自己建網(wǎng)站要多少錢(qián)
  • 洛陽(yáng)做多屏合一網(wǎng)站公司廣告推廣方案
  • 佛山做網(wǎng)站制作公司長(zhǎng)沙seo霸屏
  • 為什么選擇當(dāng)網(wǎng)站設(shè)計(jì)人員怎么做電商賣東西
  • 莘縣建設(shè)局網(wǎng)站鏈接搜索
  • 商業(yè)網(wǎng)站圖片百度聯(lián)系電話
  • 網(wǎng)站建設(shè)手機(jī)端官網(wǎng)網(wǎng)站關(guān)鍵詞優(yōu)化排名推薦
  • 男性網(wǎng)站推廣方法品牌營(yíng)銷策劃書(shū)
  • 云南專業(yè)做網(wǎng)站多少錢(qián)北京網(wǎng)站優(yōu)化常識(shí)
  • 做招聘和求職都需要哪些網(wǎng)站最近五天的新聞大事
  • 做外貿(mào)網(wǎng)站客服注冊(cè)推廣
  • 網(wǎng)站開(kāi)發(fā)工資產(chǎn)品設(shè)計(jì)公司
  • 怎么用ftp上傳網(wǎng)站seo建站
  • 五八同城找工作紹興百度seo
  • wordpress 經(jīng)過(guò)天數(shù)大地seo視頻
  • 注冊(cè)空殼公司判幾年網(wǎng)站搜索優(yōu)化官網(wǎng)
  • 免費(fèi)做網(wǎng)站的平臺(tái)網(wǎng)站排名查詢工具有哪些
  • 電子商城網(wǎng)站設(shè)計(jì)論文seo指的是什么意思
  • 專業(yè)做網(wǎng)站建設(shè)公司福州seo網(wǎng)絡(luò)推廣
  • 浙江新華建設(shè)有限公司官方網(wǎng)站站長(zhǎng)seo查詢
  • 收藏的網(wǎng)站從做系統(tǒng)后找不到了東莞關(guān)鍵詞優(yōu)化推廣
  • 營(yíng)銷型網(wǎng)站有哪些出名的沈陽(yáng)seo關(guān)鍵詞排名
  • 政府網(wǎng)站建設(shè)網(wǎng)頁(yè)設(shè)計(jì)規(guī)范網(wǎng)站seo診斷
  • 做網(wǎng)站客戶沒(méi)有付定金seo百度發(fā)包工具
  • 旅行網(wǎng)站開(kāi)發(fā)需求說(shuō)明書(shū)百度網(wǎng)頁(yè)怎么制作