@Override
public void close() throws Exception {
RuntimeContext runtimeContext = getRuntimeContext();
runtimeContext.registerUserCodeClassLoaderReleaseHookIfAbsent("dad", () -> {
if (null != connection) {
try {
connection.close();
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
Hi, 你的图挂了,贴一下代码吧。
--
Best!
Xuyang
在 2024-01-12 16:23:13,"Summer_Gu" 写道:
版本号:1.16
部署方式: Standalone Cluster集群部署
问题:通过webUi提交任务后,立马使任务报错,重复提交,会导致Metaspace内存溢出,(红框部分)
版本号:1.16
部署方式: Standalone Cluster集群部署
问题:通过webUi提交任务后,立马使任务报错,重复提交,会导致Metaspace内存溢出,(红框部分)
我看见官网有这部分说明:https://nightlies.apache.org/flink/flink-docs-release-1.16/docs/ops/debugging/debugging_classloading/#unloading-of-dynamically-loaded-classes-in-user-code
但是我在代码中填入: