This is an automated email from the ASF dual-hosted git repository.
jinsongzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/amoro.git
The following commit(s) were added to refs/heads/master by this push:
new cb03535ec [AMORO-3940] Flink config load will cause ClassCastException
when dir… (#3941)
cb03535ec is described below
commit cb03535ec41be618236db5b2001f2f7ec769b121
Author: simonsssu <[email protected]>
AuthorDate: Mon Dec 29 21:43:13 2025 +0800
[AMORO-3940] Flink config load will cause ClassCastException when dir…
(#3941)
[AMORO-3940] Flink config load will cause ClassCastException when directly
return result of Yaml load
Co-authored-by: ConradJam <[email protected]>
---
.../org/apache/amoro/server/manager/FlinkOptimizerContainer.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
a/amoro-ams/src/main/java/org/apache/amoro/server/manager/FlinkOptimizerContainer.java
b/amoro-ams/src/main/java/org/apache/amoro/server/manager/FlinkOptimizerContainer.java
index 622fe1026..39c34a720 100644
---
a/amoro-ams/src/main/java/org/apache/amoro/server/manager/FlinkOptimizerContainer.java
+++
b/amoro-ams/src/main/java/org/apache/amoro/server/manager/FlinkOptimizerContainer.java
@@ -275,13 +275,14 @@ public class FlinkOptimizerContainer extends
AbstractOptimizerContainer {
*/
private Map<String, String> loadFlinkConfig() {
try {
+ Map<String, Object> configDocument;
Path flinkConfPath = Paths.get(flinkConfDir + FLINK_CONFIG_YAML);
if (!Files.exists(flinkConfPath, LinkOption.NOFOLLOW_LINKS)) {
flinkConfPath = Paths.get(flinkConfDir + LEGACY_FLINK_CONFIG_YAML);
- return new Yaml().load(Files.newInputStream(flinkConfPath));
+ configDocument = new Yaml().load(Files.newInputStream(flinkConfPath));
+ } else {
+ configDocument = YamlParserUtils.loadYamlFile(new
File(flinkConfPath.toUri()));
}
- Map<String, Object> configDocument =
- YamlParserUtils.loadYamlFile(new File(flinkConfPath.toUri()));
return Maps.transformValues(
flatten(configDocument, ""), value -> value == null ? null :
value.toString());
} catch (Exception e) {