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

事业网站网站建设方案wordpress友链图标

事业网站网站建设方案,wordpress友链图标,vps挂网站,帝国做的网站怎么上传图片文章目录 背景主要步骤代码 背景 通常使用flink 提供的高级算子来编写flink 任务,对底层不是很了解,尤其是如何生成作业图的细节 下面通过构造一个有向无环图,来实际看一下 主要步骤 1.增加source 2.增加operator 3. 增加一条边&#xff0…

文章目录

      • 背景
      • 主要步骤
      • 代码

背景

通常使用flink 提供的高级算子来编写flink 任务,对底层不是很了解,尤其是如何生成作业图的细节
下面通过构造一个有向无环图,来实际看一下

主要步骤

1.增加source
2.增加operator
3. 增加一条边,连接source和operator
4. 增加sink
5. 增加一条边,连接operator和sink

代码

 // Step 1: Create basic configurationsConfiguration configuration = new Configuration();ExecutionConfig executionConfig = new ExecutionConfig();CheckpointConfig checkpointConfig = new CheckpointConfig();SavepointRestoreSettings savepointRestoreSettings = SavepointRestoreSettings.none();// Step 2: Create a new StreamGraph instanceStreamGraph streamGraph = new StreamGraph(configuration, executionConfig, checkpointConfig, savepointRestoreSettings);// Step 3: Add a source operatorGeneratorFunction<Long, String> generatorFunction = index -> "Number: " + index;DataGeneratorSource<String> source = new DataGeneratorSource<>(generatorFunction, Long.MAX_VALUE, RateLimiterStrategy.perSecond(1), Types.STRING);SourceOperatorFactory<String> sourceOperatorFactory = new SourceOperatorFactory<>(source, WatermarkStrategy.noWatermarks());streamGraph.addSource(1, "sourceNode", "sourceDescription", sourceOperatorFactory, TypeInformation.of(String.class), TypeInformation.of(String.class), "sourceSlot");// Step 4: Add a map operator to transform the dataStreamMap<String, String> mapOperator = new StreamMap<>(new MapFunction<String, String>() {@Overridepublic String map(String value) throws Exception {return value;}});SimpleOperatorFactory<String> mapOperatorFactory = SimpleOperatorFactory.of(mapOperator);streamGraph.addOperator(2, "mapNode", "mapDescription", mapOperatorFactory, TypeInformation.of(String.class), TypeInformation.of(String.class), "mapSlot");// Step 5: Connect source and map operatorstreamGraph.addEdge(1, 2, 0);// Step 6: Add a sink operator to consume the dataStreamMap<String, String> sinkOperator = new StreamMap<>(new MapFunction<String, String>() {@Overridepublic String map(String value) throws Exception {System.out.println(value);return value;}});SimpleOperatorFactory<String> sinkOperatorFactory = SimpleOperatorFactory.of(sinkOperator);streamGraph.addSink(3, "sinkNode", "sinkDescription", sinkOperatorFactory, TypeInformation.of(String.class), TypeInformation.of(String.class), "sinkSlot");// Step 7: Connect map and sink operatorstreamGraph.addEdge(2, 3, 0);streamGraph.setTimeCharacteristic(TimeCharacteristic.ProcessingTime);streamGraph.setMaxParallelism(1,1);streamGraph.setMaxParallelism(2,1);streamGraph.setMaxParallelism(3,1);streamGraph.setGlobalStreamExchangeMode(GlobalStreamExchangeMode.ALL_EDGES_PIPELINED);// Step 8: Convert StreamGraph to JobGraphJobGraph jobGraph = streamGraph.getJobGraph();// Step 9: Set up a MiniCluster for local executionMiniClusterConfiguration miniClusterConfig = new MiniClusterConfiguration.Builder().setNumTaskManagers(10).setNumSlotsPerTaskManager(10).build();MiniCluster miniCluster = new MiniCluster(miniClusterConfig);// Step 10: Start the MiniClusterminiCluster.start();// Step 11: Submit the job to the MiniClusterJobExecutionResult result = miniCluster.executeJobBlocking(jobGraph);System.out.println("Job completed with result: " + result);// Step 12: Stop the MiniClusterminiCluster.close();
http://www.yayakq.cn/news/784984/

相关文章:

  • 网站开发中网页之间的链接形式网站建设的网络技术
  • 网站建设实验报告手写组织网站设计公司
  • 网站制作文案杭州大型电子商务建设公司
  • 网页设计网站世界杯绵阳市建设工程信息网站
  • 代备案网站空间深圳网站建设推广方案
  • 企业网站营销如何建设可以做游戏可以视频约会的网站
  • 网站开发 案例详解工商公示网
  • 网站开发年度总结国际知名设计公司总部
  • 郑州网站建设廴汉狮网络百度商家入驻
  • 2015做那些网站致富企业建设网站 入账
  • 如何在微信平台做购买网站无备案网站加速
  • 电子政务网站建设总结如何招网站开发人员
  • 泉州做网站工作室心理咨询师招聘
  • 企业网站怎么建站网页设计示范html代码
  • 网站建设好后为什么要维护wordpress雪人主题2.0
  • 网站怎么上百度网站开发技术汇总
  • 网站转载代码南京市企业展厅设计公司
  • 做网站4000-262-263新浪博客seo
  • 基层建设论文查询官方网站重庆响应式网站建设费用
  • 滁州市建设局网站服务器网站跳转怎么做的
  • 院校网站建设对比分析实训报总结哈尔滨优化关键词免费
  • 做二手车网站需要什么网页建设中
  • 网站备案有什么好处理wordpress必备工具
  • 公司软件网站开发怎么入账金蝶二次开发
  • 哪些网站可以做花店推广开发一个网站多少钱?
  • 不备案如何架设网站wordpress专题
  • 网站建设 深圳宝安页面跳转html
  • 精美合同网站建设商业网站开发实训总结
  • 中文网站建设翻译成英文是什么意思wordpress企业网站模版
  • 健康网站 模板中天建设集团有限公司是国企吗