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

快速知彼网络网站建设手机网站用什么语言开发

快速知彼网络网站建设,手机网站用什么语言开发,国内外高校门户网站建设,erp软件开发背景 在使用flink进行集成测试时,我们会使用MiniClusterWithClientResource类,但是当我们断点导致在某个方法执行的时间比较长时,会有错误发生,那么该如何解决这个错误呢? 处理concurrent.TimeoutException: Heartbe…

背景

在使用flink进行集成测试时,我们会使用MiniClusterWithClientResource类,但是当我们断点导致在某个方法执行的时间比较长时,会有错误发生,那么该如何解决这个错误呢?

处理concurrent.TimeoutException: Heartbeat of TaskManager with id错误

其实关键的配置是heartbeat.timeout,这个错误是JobManager抛出的,意思是和某个TaskManager的心跳中断超过了指定的时间,我们把这个参数配置到MiniClusterWithClientResource类中就可以了,代码如下所示:

public class FlinkIntegrationTest {public static final Configuration config = Configuration.fromMap(new HashMap<String, String>() {{put("heartbeat.timeout", "300000");}});@ClassRulepublic static MiniClusterWithClientResource flinkCluster =new MiniClusterWithClientResource(new MiniClusterResourceConfiguration.Builder().setConfiguration(config).setNumberSlotsPerTaskManager(1).setNumberTaskManagers(3).build());@Testpublic void testStateFlatMap() throws Exception {StatefulFlatMap statefulFlatMap = new StatefulFlatMap();StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();// configure your test environmentenv.setParallelism(2);// values are collected in a static variableCollectSink.values.clear();// create a stream of custom elements and apply transformationsenv.fromElements("world", "hi").keyBy(e -> "1").flatMap(statefulFlatMap).addSink(new CollectSink());// executeenv.execute();// verify your resultsassertTrue(CollectSink.values.containsAll(Lists.newArrayList("hello world", "hello hi world")));}@Testpublic void testStateFlatMap1() throws Exception {StatefulFlatMap statefulFlatMap = new StatefulFlatMap();StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();// configure your test environmentenv.setParallelism(2);// values are collected in a static variableCollectSink.values.clear();// create a stream of custom elements and apply transformationsenv.fromElements("world", "hi", "world").keyBy(e -> e).flatMap(statefulFlatMap).addSink(new CollectSink());// executeenv.execute();// verify your resultsassertTrue(CollectSink.values.containsAll(Lists.newArrayList("hello world", "hello hi", "hello world world")));}// create a testing sinkprivate static class CollectSink implements SinkFunction<String> {// must be staticpublic static final List<String> values = Collections.synchronizedList(new ArrayList<>());@Overridepublic void invoke(String value, Context context) throws Exception {values.add(value);}}}
http://www.yayakq.cn/news/533081/

相关文章:

  • 企业网站的切片怎么做不同网站建设报价单
  • 帝国做双语网站宁夏快速自助制作网站
  • 用vs2010做网站论文wordpress程序上传到服务器
  • 关于写策划的一个网站厦门专业建站系统制作公司
  • 免费建网站域名树莓派怎么打开 wordpress
  • 做苗木的用什么网站南山企业网站建设
  • 番禺网站设计与制作网络营销发展历程ppt
  • 建设部网站技术负责人业绩表怎么快速开发一个网站
  • 抚顺建设银行网站wordpress 授权插件
  • 徐州市鼓楼区建设局网站培训网站制作
  • 织梦网做网站过程公司注册地址异常
  • 网站开发与管理实验五网站源代码怎么生成网页
  • 泊头哪给做网站的好公司做网站需要什么内容
  • 网站平台推广方法建设银行北京分行网站
  • 免费域名网站黄的免费营销软件加盟
  • wps可以做网站吗婚纱摄影图片
  • 外贸网站销售方式如何自己做淘宝网站
  • 网站开发公司方案一个人可以做网站
  • 海尔网站建设水平心悦俱乐部官方网站怎么做任务
  • 免费做网站的平台企业网络规划和设计方案
  • 如何做网站搬运工赚钱wordpress文章页
  • 徐州网站建设制作工作室千享科技网站建设
  • 网站建设需要多少技术怎么写网站建设的说明书
  • 西部数码网站管理助手 2008国内网站建设哪家好
  • 软装设计网站排名网站开发后端框架什么意思
  • 企业网站免费建站一个简单的登录界面网页代码
  • 公众号授权网站个人网页制作方案
  • 专做网站建设母婴网站的目的
  • 网站建设温州常州网站设计平台
  • 企业网站推广可以选择哪些方法?公司部门英语