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

php网站开发 多少钱手机建网站 优帮云

php网站开发 多少钱,手机建网站 优帮云,空包网站做红章底单,h5手机网站模板下载shuffle随机地将数据分配到下游的子任务。 rebalance用round robbin模式将数据分配到下游的子任务。 global把所有的数据都分配到一个分区。 partitionCustom: 自定义数据分区。 package cn.edu.tju.demo; import org.apache.flink.api.common.functions.; import org.apache…shuffle随机地将数据分配到下游的子任务。 rebalance用round robbin模式将数据分配到下游的子任务。 global把所有的数据都分配到一个分区。 partitionCustom: 自定义数据分区。 package cn.edu.tju.demo; import org.apache.flink.api.common.functions.; import org.apache.flink.api.common.serialization.SimpleStringSchema; import org.apache.flink.api.java.tuple.Tuple2; import org.apache.flink.configuration.Configuration; import org.apache.flink.streaming.api.collector.selector.OutputSelector; import org.apache.flink.streaming.api.datastream.; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.functions.co.CoMapFunction; import org.apache.flink.streaming.api.functions.source.SourceFunction; import org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer; import org.apache.flink.util.Collector; import org.apache.kafka.clients.consumer.ConsumerConfig; import org.apache.kafka.clients.producer.ProducerConfig; import org.apache.kafka.common.serialization.StringDeserializer; import org.apache.kafka.common.serialization.StringSerializer; import java.util.*; public class Test12 { public static void main(String[] args) throws Exception { StreamExecutionEnvironment environment StreamExecutionEnvironment .getExecutionEnvironment(); DataStreamSourceString mySource environment.addSource(new MySourceFunction());SingleOutputStreamOperatorTuple2String, Integer mapStream mySource.map(new MapFunctionString, Tuple2String, Integer() {Overridepublic Tuple2String, Integer map(String value) throws Exception {return new Tuple2(value, new Random().nextInt(10));}});DataStreamTuple2String, Integer resultStream mapStream.partitionCustom(new MyPartitioner(), 1);resultStream.print();environment.execute(my job);}public static class MyPartitioner implements PartitionerInteger{Overridepublic int partition(Integer key, int partitions) {return key % partitions;} }public static class MySourceFunction implements SourceFunctionString {private boolean runningFlag true;Overridepublic void run(SourceContextString ctx) throws Exception {while (runningFlag){ctx.collect(hi world);ctx.collect(hello world);Thread.sleep(30000);}}Overridepublic void cancel() {runningFlag false;} }}
http://www.hkea.cn/news/14275186/

相关文章:

  • 中国站长站官网微信商城小程序开发一般需要多少钱
  • 外贸企业建网站哪个网站可以做面料订单
  • 长沙做网站微联讯点很好网页页面下载
  • 商洛网站建设湖南软件开发
  • 自己做的网站点首页出错百姓畅言六安杂谈
  • 郑州服务设计公司网站vps 上装wordpress
  • 英文版科技网站ns解析网站
  • 湘潭响应式网站建设 速来磐石网络网络拓扑图
  • 图片交易网站源码电商网站设计文档
  • 免费网络短剧网站安阳流调报告
  • 财经那个网站做的好deppt模板网
  • 网站建设的制度建设大浪做网站
  • 兰州新区规划建设局网站it外包服务商10强
  • 开通域名后怎样建设网站东莞网站模板
  • 建站用什么搭建比较好门户网站安全建设
  • 做网站与做app哪个容易做外贸兼职的网站
  • 无锡网站建设的公司曲阜网站建设哪家便宜
  • 养猪网站建设规划书wordpress免费主题cms
  • 摄影师签约有哪些网站jsp网站开发需要哪些技术
  • 网站建设yingkagou上海建站哪家好
  • 彩票销售网站开发为何网站不被百度收录
  • 绿色软件下载网站推荐广告网站建设方案
  • 做设计不进设计公司网站国内物流公司网站建设
  • 高密做网站的代理网站建设制作 南京公司哪家好
  • php网站开发用什么软件网站一元空间有哪些呀
  • 绍兴建设公司网站国内比较高端的设计网站
  • 网站开发框架的工具凡科建站手机版登录
  • 沈阳公司网站神起网络公司
  • 与网站建设有关的招标文件做旅游网站运营
  • 购物网站建设的可行性wordpress 插件全部消失