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

网站开发需要有什么证书建设网站企业排行

网站开发需要有什么证书,建设网站企业排行,wordpress 新网站 代码,google广告在wordpress文章目录 背景主要步骤代码 背景 通常使用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/997670/

相关文章:

  • 怎样做办公用品销售网站贵阳市观山湖区建设局网站
  • 网站建设哪家专业公司好wordpress软件网站模板下载
  • 佛山做网站yunzhanfswordpress app 打包
  • 中国制造网外贸站个人微博网页制作代码教程
  • 建设银行的网站用户名是什么网站首页排名下降
  • 旅游网站建设ppt中国建设行业网
  • 如何查网站关键词东莞宣传册设计
  • 网站开发项目工期流程邢台seo招聘
  • 做网站需要学php吗儿童网站模板免费下载
  • 临沂莒南网站建设南京制作网站优化
  • 嘉兴市南湖区建设街道网站做特卖的网站怎么赚钱
  • 手机网站制作要求wordpress如何导入文章
  • 怎么做网站上打字体免费素材网视频
  • 南宁站建好就够用网页设计是网站建设与管理的内容吗
  • 如何对网站做镜像服装网站建设多少钱
  • 网站seo内容优化网站建设系统分析
  • ps做网站素材文件打包dw网页编辑器
  • wordpress加站点描述wordpress 上传设置
  • 中文域名网站建设更合高明网站建设
  • wordpress 8211seo外包怎么收费
  • 建设网站培训的ppt类似美团网的网站是怎么做的
  • 宁波建设网站公众号关注新建wordpress模板
  • 值得买网站模板免费发布信息网站大全
  • 大连网站建设仟亿科技婚纱摄影网站策划书
  • 沈阳做网站有名公司揭阳百度推广优化
  • 沈阳seo网站推广网站设计师薪资
  • 做资料分享网站无锡装修公司做网站
  • 网站 稳定性购物商城网站建设公司
  • 免费完整版的网站模板图片外链工具
  • 哪里找做网站的wordpress saharan