Open Xuxiaotuan opened 10 months ago
Initially springboot service is initialized using java's original classloader
(sun/misc/Launcher$AppClassLoader)
When submitting the k8s flink task, Will use flink
(org/apache/streampark/flink/proxy/ChildFirstClassLoader)
This reinitializes InternalConfigHolder
I tried to add an output to InternalConfigHolder, printed it once after the initial service, and then submitted it to the flink environment. Will print again
Search before asking
Java Version
Java 8
Scala Version
2.12.x
StreamPark Version
dev
Flink Version
flink all version
deploy mode
kubernetes-session
What happened
The class loads InternalConfigHolder as a cache class, and an object is regenerated when used (it should be the same one, otherwise the cache will become invalid, and everything will become the default value)
As follows:
Springboot startup
Springboot startup is completed, and the yaml configuration is refreshed into InternalConfigHolder through EnvInitializer
After springboot is started, click to start k8s sesssion deploy
It can be seen that after passing this classloader, InternalConfigHolder regenerates an object
Error Exception
No response
Screenshots
No response
Are you willing to submit PR?
Code of Conduct