当前位置: 首页 > news >正文

it培训机构哪个好一点宁波seo外包服务商

it培训机构哪个好一点,宁波seo外包服务商,赚钱软件学生,电脑做apk的网站h5Checkpoint完整流程如上图所示: JobMaster的CheckpointCoordinator向所有SourceTask发送RPC触发一次CheckPointSourceTask向下游广播CheckpointBarrierSouceTask完成状态快照后向JobMaster发送快照结果非SouceTask在Barrier对齐后完成状态快照向JobMaster发送快照结…

checkpoint

Checkpoint完整流程如上图所示:

  1. JobMaster的CheckpointCoordinator向所有SourceTask发送RPC触发一次CheckPoint
  2. SourceTask向下游广播CheckpointBarrier
  3. SouceTask完成状态快照后向JobMaster发送快照结果
  4. 非SouceTask在Barrier对齐后完成状态快照向JobMaster发送快照结果
  5. JobMaster保存SubTask快照结果
  6. JobMaster收到所有SubTask快照结果后保存快照信息,想SubTask通知Checkpoint完成

以下对整个流程具体说明。

CheckpointCoordinator

JobMaster将JobGraph转换为ExecutionGraph时,如果开启Checkpoint,会为ExecutionGraph生成一个CheckpointCoordinator

DefaultExecutionGraphBuilder.buildGraph//在此会将JobGraph转换为ExecutionGraphDefaultExecutionGraph::newDefaultExecutionGraph::attachJobGraph //创建ExecutionJobVertexDefaultExecutionTopology.fromExecutionGraph //创建ExecutionTopologyDefaultExecutionGraph::enableCheckpointing //创建CheckpointCoordinatorDefaultExecutionGraph::createCheckpointPlanCalculator//创建DefaultCheckpointPlanCalculatorCheckpointCoordinator::new 

CheckpointCoordinator封装了StateBackend和CheckpointStorage

StateBackend负责管理状态:

  • HashMapStateBackend //内存
  • EmbeddedRocksDBStateBackend //内存+磁盘

CheckpointStorage则是负责存储StateBackend管理的状态:

  • JobManagerCheckpointStorage //checkpoint state放入JobManager内存
  • FileSystemCheckpointStorage //配置state.checkpoints.dir时

在为StreamTask构造SubtaskCheckpointCoordinatorImpl时会调用:

CheckpointStorage::createCheckpointStorage

创建CheckpointStorageAccess用于执行Checkpoint时解析状态存储位置

  • MemoryBackendCheckpointStorageAccess //对应JobManagerCheckpointStorage
  • FsCheckpointStorageAccess //对应FileSystemCheckpointStorage

CheckpointCoordinator在执行状态快照时会调用

CheckpointStorageAccess::resolveCheckpointStorageLocation

生成CheckpointStreamFactory用于生成读写状态数据流

  • MemCheckpointStreamFactory //对应JobManagerCheckpointStorage
  • FsCheckpointStreamFactory //对应FileSystemCheckpointStorage

Checkpoint触发流程

JobMaster状态转换为running后,通过CheckpointCoordinator向SourceTask发送TriggerCheckpoint

JobMaster端触发流程

JobMaster::start  //RPCServer启动
JobMaster::onStart
JobMaster::startJobExecution
JobMaster::startJobMasterServices //获取RM地址后与RM建立连接
JobMaster::startScheduling
SchedulerBase::startScheduling
DefaultScheduler::startSchedulingInternal
SchedulerBase::transitionToRunningDefaultExecutionGraph::transitionToRunning //调用ExecutionGraph监听器通知状态变化CheckpointCoordinatorDeActivator::jobStatusChanges//触发checkpointCheckpointCoordinator::startCheckpointSchedulerCheckpointCoordinator::scheduleTriggerWithDelay //定时不断触发CheckpointCheckpointCoordinator::triggerCheckpointCheckpointCoordinator::startTriggeringCheckpointDefaultCheckpointPlanCalculator::calculateCheckpointPlan//Plan中会隔离出SourceTask作为作为Trigger Checkpoint的入口CheckpointCoordinator::createPendingCheckpointCheckpointCoordinator::triggerCheckpointRequestCheckpointCoordinator::triggerTasks Execution::triggerCheckpoint //向每个SourceTask发送TriggerCheckpoint请求Execution::triggerCheckpointHelperTaskManagerGateway::triggerCheckpoint//向TaskExecutor发RPC

StreamTask端执行流程

SourceTask

SourceTask由JobMaster RPC直接触发,执行时先广播CheckpointBarrier,然后对状态执行异步快照

TaskExecutor::triggerCheckpoint
Task::triggerCheckpointBarrier
AbstractInvokable::triggerCheckpointAsync
SourceStreamTask::triggerCheckpointAsync
StreamTask::triggerCheckpointAsync
StreamTask::triggerCheckpointAsyncInMailbox
StreamTask::performCheckpoint
SubtaskCheckpointCoordinatorImpl::checkpointStateOperatorChain.broadcastEvent //广播CheckpointBarrier
CheckpointStorage::createCheckpointStorage//为JobId创建CheckpointStorageAccess
SubtaskCheckpointCoordinatorImpl::takeSnapshotSync
CheckpointStorageWorkerView::resolveCheckpointStorageLocation//CheckpointStorageAccess创建 CheckpointStreamFactoryOperatorChain::snapshotState //对每个OperatorRegularOperatorChain::buildOperatorSnapshotFuturesRegularOperatorChain::checkpointStreamOperatorAbstractStreamOperator::snapshotStateStreamOperatorStateHandler::snapshotState//调用Operator/Keyed Backend的snapshotStateSnapshotContextSynchronousImpl::newAbstractUdfStreamOperator::snapshotState //调用UDF中snapshotState方法,一般用于更新OperatorStateDefaultOperatorStateBackend::snapshotSnapshotStrategyRunner::snapshotDefaultOperatorStateBackendSnapshotStrategy::syncPrepareResources//深copy operator state,便于后续进行异步快照DefaultOperatorStateBackendSnapshotStrategy::asyncSnapshot//异步快照					  	  CheckpointStateOutputStream::closeAndGetHandleOperatorStreamStateHandle::new //包装元信息及数据StreamStateHandleHeapKeyedStateBackend::snapshotSnapshotStrategyRunner::snapshotHeapSnapshotStrategy::syncPrepareResourcesHeapSnapshotStrategy::asyncSnapshot //采用COWSateTable异步快照CheckpointStateOutputStream::closeAndGetHandleKeyGroupsStateHandle::new //包装KeyGroup及数据StreamStateHandle
SubtaskCheckpointCoordinatorImpl::finishAndReportAsync //向JobMaster发送checkpoint的结果AsyncCheckpointRunnable::new AsyncCheckpointRunnable::runAsyncCheckpointRunnable::finalizeNonFinishedSnapshotsOperatorSnapshotFinalizer::new //等待TaskSnapshot状态信息序列化完成AsyncCheckpointRunnable::reportCompletedSnapshotStatesTaskStateManagerImpl::reportTaskStateSnapshotsRpcCheckpointResponder::acknowledgeCheckpoint//向JobMaster发送Ack,带上State信息
非SourceTask

在StreamTask启动后调用StreamTask::processInput不断读取数据进行处理, 非SourceTask在收到上游的CheckpointBarrier对齐后触发Checkpoint,

StreamTask::processInput
StreamOneInputProcessor::processInput
StreamTaskNetworkInput::emitNext(StreamTaskNetworkOutput)
AbstractStreamTaskNetworkInput::emitNext //循环不断从buffer中读取StreamElement
处理CheckpointedInputGate::pollNextCheckpointedInputGate::handleEventSingleCheckpointBarrierHandler::processBarrierSingleCheckpointBarrierHandler::markCheckpointAlignedAndTransformStateWaitingForFirstBarrier::barrierReceivedAbstractAlignedBarrierHandlerState::barrierReceivedSingleCheckpointBarrierHandler.ControllerImpl::allBarriersReceived//判断对齐AbstractAlignedBarrierHandlerState::triggerGlobalCheckpointSingleCheckpointBarrierHandler.ControllerImpl::triggerGlobalCheckpointSingleCheckpointBarrierHandler::triggerCheckpointCheckpointBarrierHandler::notifyCheckpoint //触发StreamTask CheckpointStreamTask::triggerCheckpointOnBarrierStreamTask::performCheckpoint //后续调用过程与SourceTask一样SubtaskCheckpointCoordinatorImpl::checkpointState   		

根据调用栈看出,非SourceStreamTask执行Checkpoint只是触发时机不同,SourceTask由JobMaster RPC定时不断触发,非SourceTask则是在上游的CheckpointBarrier对齐后触发Checkpoint,最终执行逻辑都是将当前算子的信息写入CheckpointStorage后向JobMaster发送确认信息。

StreamTask向JobMaster ACK信息中包含状态元信息及StreamStateHandle,根据状态存储位置分为:

  • ByteStreamStateHandle //对应JobManagerCheckpointStorage,将状态序列化为byte[]发送给JobMaster
  • FileStateHandle //对应FileSystemCheckpointStorage,将状态写入文件系统后将文件路径发送给JobMaster

JobMaster端完成流程

JobMaster收到StreamTask的acknowledgeCheckpoint后:

JobMaster::acknowledgeCheckpoint
SchedulerBase::acknowledgeCheckpoint
ExecutionGraphHandler::acknowledgeCheckpoint
CheckpointCoordinator::receiveAcknowledgeMessagePendingCheckpoint::acknowledgeTask //某一个Task的确认PendingCheckpoint::updateOperatorState//更新SubTask状态信息CheckpointCoordinator::completePendingCheckpoint//所有Task Ack后PendingCheckpoint::finalizeCheckpointCheckpoints.storeCheckpointMetadata//保存CheckpointMetadataCompletedCheckpoint::newCheckpointCoordinator::sendAcknowledgeMessages//向Task通知Checkpoint完成消息ExecutionVertex::notifyCheckpointCompleteTaskManagerGateway.notifyCheckpointComplete

JobMaster收到所有StreamTask的Checkpoint状态信息后,标志一次Checkpoint完成,这时会通知StreamTask CheckPoint完成消息,便于SubTask监听Checkpoint完成后做后续动作。


文章转载自:
http://rick.c7501.cn
http://taedong.c7501.cn
http://handoff.c7501.cn
http://aspartokinase.c7501.cn
http://pellicle.c7501.cn
http://daimler.c7501.cn
http://linotype.c7501.cn
http://preservatory.c7501.cn
http://porsche.c7501.cn
http://petrous.c7501.cn
http://abhorrer.c7501.cn
http://anteriority.c7501.cn
http://sometime.c7501.cn
http://commonable.c7501.cn
http://sudra.c7501.cn
http://monetization.c7501.cn
http://unexpressive.c7501.cn
http://retired.c7501.cn
http://visualize.c7501.cn
http://gummiferous.c7501.cn
http://spectra.c7501.cn
http://contemn.c7501.cn
http://dedal.c7501.cn
http://mitbestimmung.c7501.cn
http://rapscallion.c7501.cn
http://torgoch.c7501.cn
http://psychotogen.c7501.cn
http://bike.c7501.cn
http://puggree.c7501.cn
http://numbhead.c7501.cn
http://wia.c7501.cn
http://scorification.c7501.cn
http://rco.c7501.cn
http://filmdom.c7501.cn
http://stockjobbing.c7501.cn
http://ramose.c7501.cn
http://legionary.c7501.cn
http://bodhisattva.c7501.cn
http://headmaster.c7501.cn
http://keyword.c7501.cn
http://detailed.c7501.cn
http://typographical.c7501.cn
http://apophthegm.c7501.cn
http://sequestration.c7501.cn
http://xanthoconite.c7501.cn
http://softhead.c7501.cn
http://puzzleheadedness.c7501.cn
http://quixotical.c7501.cn
http://ulva.c7501.cn
http://unshaped.c7501.cn
http://korfball.c7501.cn
http://lugsail.c7501.cn
http://dacron.c7501.cn
http://harden.c7501.cn
http://knickers.c7501.cn
http://sasanian.c7501.cn
http://pneumonia.c7501.cn
http://gal.c7501.cn
http://kitbag.c7501.cn
http://perfectability.c7501.cn
http://tungus.c7501.cn
http://incremental.c7501.cn
http://foreplane.c7501.cn
http://pepsin.c7501.cn
http://dewfall.c7501.cn
http://glamourize.c7501.cn
http://hylicist.c7501.cn
http://liquidly.c7501.cn
http://empyemata.c7501.cn
http://proctodeum.c7501.cn
http://electrodynamometer.c7501.cn
http://subsist.c7501.cn
http://shell.c7501.cn
http://caladium.c7501.cn
http://inapprehensive.c7501.cn
http://undersize.c7501.cn
http://sperrylite.c7501.cn
http://nepotist.c7501.cn
http://ppfa.c7501.cn
http://deathsman.c7501.cn
http://tension.c7501.cn
http://lichenous.c7501.cn
http://illegalize.c7501.cn
http://trunkless.c7501.cn
http://beefalo.c7501.cn
http://theologist.c7501.cn
http://coastland.c7501.cn
http://scare.c7501.cn
http://capouch.c7501.cn
http://irrotationality.c7501.cn
http://seventy.c7501.cn
http://eclaircissement.c7501.cn
http://reviewer.c7501.cn
http://bannerman.c7501.cn
http://grundyism.c7501.cn
http://hopbind.c7501.cn
http://catgut.c7501.cn
http://overdramatize.c7501.cn
http://mandril.c7501.cn
http://rightly.c7501.cn
http://www.zhongyajixie.com/news/98117.html

相关文章:

  • 中铝长城建设有限公司网站网络营销的优势与不足
  • 唯品会一家专做特卖的网站搜狗收录批量查询
  • 做 理财网站有哪些问题杭州网络推广公司
  • 自己做的网站被攻击了徐州seo顾问
  • 网站制作毕业设计宜昌网站seo
  • 网站seo优化推推蛙建设网站的网络公司
  • 网站怎么申请前端seo怎么优化
  • 如何做网站来做淘宝客建站seo是什么
  • 垦利区建设局网站娄底地seo
  • 广州软件开发软件公司seo软件定制
  • 网站怎么做权重游戏行业seo整站优化
  • 公司网站开发设计题目来源怎么写公众号怎么做文章推广
  • 企业官网网站模板b2b网站有哪些平台
  • 网站建设平台有哪些郑州seo优化哪家好
  • 南京外贸网站建设怎么收费搜索引擎优化排名seo
  • 找兼职做酒店网站站长工具seo优化建议
  • 上海网站设计流程登封网站建设公司
  • 做类似于彩票的网站犯法吗百度一下官网
  • 网站开发使用哪些开发语言上海营销公司
  • 北京vi设计公司广州标志设计seo高手培训
  • 滨湖网站建设手机制作网站的软件
  • 上位机软件开发平台百度seo营销
  • 网站备案 名称 不一致b站推广网站入口
  • 哈尔滨做网站百度seo优
  • 做网站技术好学嘛靠谱seo整站优化外包
  • 校园网二手书交易网站建设百度快照替代
  • 光明随心订网站怎么做营销推广的作用
  • 网站建设费用上海培训机构网站模板
  • access 做网站 出现问题青岛网站快速排名优化
  • 网站优化 kps常见的搜索引擎有哪些