flink
flink copied to clipboard
[FLINK-34497][REST] Avoid using system classloader in SerializedThrowableDeserializer
What is the purpose of the change
When using Flink rest client in systems like spring boot, which are using Executable Jar Format, SerializedThrowable will not be deserialized because system classloader will not be able to find class SerializedThrowable which is located in a nested jar.
Brief change log
Use Thread.currentThread().getContextClassLoader() to replace ClassLoader.getSystemClassLoader().
Verifying this change
This change is a trivial rework without any test coverage.
Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (no)
- The public API, i.e., is any changed class annotated with
@Public(Evolving): (no) - The serializers: (no)
- The runtime per-record code paths (performance sensitive): (no)
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
- The S3 file system connector: (no)
Documentation
- Does this pull request introduce a new feature? (no)
- If yes, how is the feature documented? (not applicable )
CI report:
- b6399b0f2aa19c844cc8a3e60bda6cb8e3cf866f Azure: SUCCESS
Bot commands
The @flinkbot bot supports the following commands:@flinkbot run azurere-run the last Azure build