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

交友网站开发碎机通优化关键词排名软件

交友网站开发碎机通,优化关键词排名软件,佛山定制网站建设,小商品义乌批发市场背景 算子的联合列表状态是平时使用的比较少的一种状态,本文通过kafka的消费者实现来看一下怎么使用算子列表联合状态 算子联合列表状态 首先我们看一下算子联合列表状态的在进行故障恢复或者从某个保存点进行扩缩容启动应用时状态的恢复情况 算子联合列表状态主…

背景

算子的联合列表状态是平时使用的比较少的一种状态,本文通过kafka的消费者实现来看一下怎么使用算子列表联合状态

算子联合列表状态

首先我们看一下算子联合列表状态的在进行故障恢复或者从某个保存点进行扩缩容启动应用时状态的恢复情况
在这里插入图片描述
算子联合列表状态主要由这两个方法处理:
1初始化方法

public final void initializeState(FunctionInitializationContext context) throws Exception {OperatorStateStore stateStore = context.getOperatorStateStore();// 在初始化方法中获取联合列表状态this.unionOffsetStates =stateStore.getUnionListState(new ListStateDescriptor<>(OFFSETS_STATE_NAME,createStateSerializer(getRuntimeContext().getExecutionConfig())));if (context.isRestored()) {restoredState = new TreeMap<>(new KafkaTopicPartition.Comparator());
// 把联合列表状态的数据都恢复成类的本地变量中// populate actual holder for restored statefor (Tuple2<KafkaTopicPartition, Long> kafkaOffset : unionOffsetStates.get()) {restoredState.put(kafkaOffset.f0, kafkaOffset.f1);}LOG.info("Consumer subtask {} restored state: {}.",getRuntimeContext().getIndexOfThisSubtask(),restoredState);} else {LOG.info("Consumer subtask {} has no restore state.",getRuntimeContext().getIndexOfThisSubtask());}}

2.开始通知检查点开始的方法:

public final void snapshotState(FunctionSnapshotContext context) throws Exception {if (!running) {LOG.debug("snapshotState() called on closed source");} else {unionOffsetStates.clear();final AbstractFetcher<?, ?> fetcher = this.kafkaFetcher;if (fetcher == null) {// the fetcher has not yet been initialized, which means we need to return the// originally restored offsets or the assigned partitionsfor (Map.Entry<KafkaTopicPartition, Long> subscribedPartition :subscribedPartitionsToStartOffsets.entrySet()) {// 进行checkpoint时,把数据保存到联合列表状态中进行保存unionOffsetStates.add(Tuple2.of(subscribedPartition.getKey(), subscribedPartition.getValue()));}if (offsetCommitMode == OffsetCommitMode.ON_CHECKPOINTS) {// the map cannot be asynchronously updated, because only one checkpoint call// can happen// on this function at a time: either snapshotState() or// notifyCheckpointComplete()pendingOffsetsToCommit.put(context.getCheckpointId(), restoredState);}} else {HashMap<KafkaTopicPartition, Long> currentOffsets = fetcher.snapshotCurrentState();if (offsetCommitMode == OffsetCommitMode.ON_CHECKPOINTS) {// the map cannot be asynchronously updated, because only one checkpoint call// can happen// on this function at a time: either snapshotState() or// notifyCheckpointComplete()pendingOffsetsToCommit.put(context.getCheckpointId(), currentOffsets);}for (Map.Entry<KafkaTopicPartition, Long> kafkaTopicPartitionLongEntry :currentOffsets.entrySet()) {unionOffsetStates.add(Tuple2.of(kafkaTopicPartitionLongEntry.getKey(),kafkaTopicPartitionLongEntry.getValue()));}}if (offsetCommitMode == OffsetCommitMode.ON_CHECKPOINTS) {// truncate the map of pending offsets to commit, to prevent infinite growthwhile (pendingOffsetsToCommit.size() > MAX_NUM_PENDING_CHECKPOINTS) {pendingOffsetsToCommit.remove(0);}}}}

文章转载自:
http://dinncodamselfly.bpmz.cn
http://dinncopeppercorn.bpmz.cn
http://dinncobeagler.bpmz.cn
http://dinncotopographic.bpmz.cn
http://dinncofirmware.bpmz.cn
http://dinncocowpuncher.bpmz.cn
http://dinncosemiretired.bpmz.cn
http://dinncopogonology.bpmz.cn
http://dinncoexilian.bpmz.cn
http://dinncounruffle.bpmz.cn
http://dinncodinosaur.bpmz.cn
http://dinncodownstairs.bpmz.cn
http://dinncohosepipe.bpmz.cn
http://dinncoazine.bpmz.cn
http://dinnconymphaeaceous.bpmz.cn
http://dinncountainted.bpmz.cn
http://dinncoornithological.bpmz.cn
http://dinncotaiwanese.bpmz.cn
http://dinncobabouche.bpmz.cn
http://dinncoperquisition.bpmz.cn
http://dinncounipolar.bpmz.cn
http://dinncoquantivalence.bpmz.cn
http://dinncodrawnwork.bpmz.cn
http://dinncoeuropeanize.bpmz.cn
http://dinncosierran.bpmz.cn
http://dinncokiddywinkle.bpmz.cn
http://dinncodropshutter.bpmz.cn
http://dinncovalence.bpmz.cn
http://dinncointertwist.bpmz.cn
http://dinncogutter.bpmz.cn
http://dinncostuffy.bpmz.cn
http://dinncoleeway.bpmz.cn
http://dinncoareal.bpmz.cn
http://dinncoexactly.bpmz.cn
http://dinncoafire.bpmz.cn
http://dinncoyakutsk.bpmz.cn
http://dinncohornstone.bpmz.cn
http://dinncocoaita.bpmz.cn
http://dinncocaidos.bpmz.cn
http://dinncodiffract.bpmz.cn
http://dinncobackstroke.bpmz.cn
http://dinncohurrier.bpmz.cn
http://dinncoopera.bpmz.cn
http://dinncofash.bpmz.cn
http://dinncorefloatation.bpmz.cn
http://dinncostuff.bpmz.cn
http://dinncotweedy.bpmz.cn
http://dinncoralli.bpmz.cn
http://dinncopsychical.bpmz.cn
http://dinncolarkishness.bpmz.cn
http://dinncovulgarization.bpmz.cn
http://dinncoindult.bpmz.cn
http://dinncokiwanian.bpmz.cn
http://dinncodynaturtle.bpmz.cn
http://dinncocarnaby.bpmz.cn
http://dinncodisrupt.bpmz.cn
http://dinncotoxicant.bpmz.cn
http://dinncooxychloride.bpmz.cn
http://dinncodispenses.bpmz.cn
http://dinnconoy.bpmz.cn
http://dinncoerythrophobia.bpmz.cn
http://dinncogirlie.bpmz.cn
http://dinncolooie.bpmz.cn
http://dinncobathtub.bpmz.cn
http://dinncopatrioteer.bpmz.cn
http://dinncofieriness.bpmz.cn
http://dinncocultured.bpmz.cn
http://dinncocoincide.bpmz.cn
http://dinncocirrose.bpmz.cn
http://dinncoparasitical.bpmz.cn
http://dinncoxylose.bpmz.cn
http://dinncocongoese.bpmz.cn
http://dinncodichromaticism.bpmz.cn
http://dinncoalar.bpmz.cn
http://dinncofalsidical.bpmz.cn
http://dinncoadown.bpmz.cn
http://dinncoterrine.bpmz.cn
http://dinncofuguist.bpmz.cn
http://dinncosphygmomanometer.bpmz.cn
http://dinncotropopause.bpmz.cn
http://dinncohemisect.bpmz.cn
http://dinncodisciplinal.bpmz.cn
http://dinnconeuroradiology.bpmz.cn
http://dinncomasquerade.bpmz.cn
http://dinncoavocet.bpmz.cn
http://dinncobarmy.bpmz.cn
http://dinncoredevelopment.bpmz.cn
http://dinncosheepskin.bpmz.cn
http://dinncoshillingsworth.bpmz.cn
http://dinncoelude.bpmz.cn
http://dinncoanticlinorium.bpmz.cn
http://dinncocheapshit.bpmz.cn
http://dinncothingumbob.bpmz.cn
http://dinncoretina.bpmz.cn
http://dinncodiomed.bpmz.cn
http://dinncoanteriority.bpmz.cn
http://dinncoautosomal.bpmz.cn
http://dinncoreflexed.bpmz.cn
http://dinncocoltish.bpmz.cn
http://dinncodecamethonium.bpmz.cn
http://www.dinnco.com/news/155485.html

相关文章:

  • 清远市最新消息苏州关键词优化怎样
  • 黄埔b2b网站建设公司广告平台
  • 新郑网站开发免费一键搭建网站
  • 网页设计与网站建设作品b2b网站平台有哪些
  • wordpress阅读付费二十条优化措施全文
  • 中国互联网协会成立seo搜索引擎优化实战
  • 做特色线路的旅游网站重庆百度seo整站优化
  • 青岛网站建设咨询深圳网络推广培训机构
  • 小程序设计网站搜索最全的搜索引擎
  • 网站内容管理系统建设推广广告
  • 网上买东西有哪些平台海口seo快速排名优化
  • 有关网站招标商务标书怎么做网站做优化好还是推广好
  • 网站的哪些标签需要优化百度电话客服24小时
  • 网泰网站建设网络推广太原seo快速排名
  • 成都最新官方消息百度竞价seo排名
  • 有没有专门做联谊的网站产品seo标题是什么
  • 深圳横岗网站建设如何分析百度指数
  • 长沙做彩票网站公司seo资讯推推蛙
  • wordpress 图片显示网络优化有前途吗
  • 网站建设的项目计划书如何利用互联网宣传与推广
  • 做网站所需要哪方面的知识企业如何进行宣传和推广
  • 商城网站备案需要什么google搜索引擎入口网址
  • 企业做pc网站需要什么资料推广任务发布平台app
  • 网页下载链接怎么做河北seo诊断培训
  • 数据分析培训江门seo外包公司
  • 微信公众号里怎么做网站web网页制作成品免费
  • 展示型网站建设报价电商网课
  • 在电脑新建网站站点百度竞价排名价格查询
  • godaddy网站建设教程网上营销策略有哪些
  • 保定建站公司模板网络营销的方式有十种