java图片超过1m读取过慢,Java8-如何解决状态大小较小的 checkpoints速度慢的问题?...

我有一个flink应用程序(flink版本是1.9.2),它启用了 checkpoints功能。当我在apache flink平台上运行它时。我总是收到checkpoint failed消息:checkpoint expired before完成。之后在 checkpoints期间检查taskManager的threadDumps,我发现包含两个请求外部服务的操作符的线程总是处于runnable状态。下面是我对这个操作符的设计和 checkpoints配置。请帮助建议如何解决这个问题?

操作员设计:

public class OperatorA extends RichMapFunction {

private Connection connection;

private String getCusipSourceIdPairsQuery;

private String getCusipListQuery;

private MapState> modifiedCusipState;

private MapState> bwicMatchedModifiedCusipState;

@Override

public POJOA map(POJOA value) throw Exception {

// create local variable PreparedStatement every time invoke this map method

// update/clear those two MapStates

}

@Override

public void open(Configuration parameters) {

// initialize jdbc connection and TTL MapStates using GlobalJobParameters

}

@Override

public void close() {

// close jdbc connection

}

}

public class OperatorB extends RichMapFunction {

private MyServiceA serviceA;

private MyServiceB serviceB;

@Override

public POJOA map(POJOA value) throw Exception {

// call a restful GET API of ServiceB, get a XML response, about 500 fields in the response.

// use serviceA's function to extract the XML document and then populate the value fields.

}

@Override

public void open(Configuration parameters) {

// initialize local jdbc connection and PreparedStatement using globalJobParameters. then use the executed results to initialize serviceA.

// initialize serviceB.

}

}

checkpoints配置:

Checkpointing Mode Exactly Once

Interval 15m 0s

Timeout 10m 0s

Minimum Pause Between Checkpoints 5m 0s

Maximum Concurrent Checkpoints 1

Persist Checkpoints Externally Disabled

checkpoints历史记录示例:

ID Status Acknowledged Trigger Time Latest Acknowledgement End to End Duration State Size Buffered During Alignment

20 In Progress 3/12 (25%) 15:03:13 15:04:14 1m 1s 5.65 KB 0 B

19 Failed 3/12 14:48:13 14:50:12 10m 0s 5.65 KB 0 B

18 Failed 3/12 14:33:13 14:34:50 10m 0s 5.65 KB 0 B

17 Failed 4/12 14:18:13 14:27:04 9m 59s 2.91 MB 64.0 KB

16 Failed 3/12 14:03:13 14:05:18 10m 0s 5.65 KB 0 B

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值