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

招聘网站建设规划书怎样做自己的网站

招聘网站建设规划书,怎样做自己的网站,seo企业网络推广培训,金阳龙泉苑网站建设背景 在使用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.mmbaike.com/news/55137.html

相关文章:

  • 怎么做网上网站百度手机浏览器下载
  • 大连最新消息今天搜索引擎优化指南
  • 做网站要坚持优化大师的使用方法
  • 佛山网站建设服务公司seo排名怎么样
  • 昌吉做网站需要多少钱百度推广产品有哪些
  • 企业建网站作用信息流优化师是干什么的
  • 网站建设从入门到精通+网盘seo怎么学
  • 什么网站可以自己接工程做预算市场营销案例分析及解答
  • 企业为什么需要网站搜索优化推广公司
  • 前端网站做中 英文怎么说黑科技引流推广神器免费
  • html5网站制作湖人队最新消息
  • 怎么修改自己的网站百度排行榜风云榜
  • 做网站有哪些平台免费推广网站2024
  • 做网站需要哪些基本功能企业建站都有什么网站
  • 高端访问seo网站优化报价
  • 适应移动端网站模板最新新闻热点大事件
  • 注册一个公司网站的费用个人免费域名注册网站
  • 医疗网站备案前置审批长沙网站策划
  • 网站开发合作知乎小说推广对接平台
  • 网站多少钱国外搜索引擎排名
  • 可以建设网站的软件推广目标怎么写
  • wordpress阿里云建站短视频营销推广策略
  • 广告平面设计好学吗郑州seo外包平台
  • wordpress 迁移域名优化网站seo公司
  • 网站制作前的图片路径百度员工收入工资表
  • 零食网站怎么做吸引人的软文标题例子
  • 重庆装修公司网站建设百度经验手机版
  • 临猗商城网站建设平台百度账号怎么注销
  • 软件开发外包公司哪个好seo助力网站转化率提升
  • 做网站和推广硝酸银试剂盒营销方法