You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampark.apache.org by be...@apache.org on 2026/09/15 01:27:15 UTC

(streampark) branch dev-2.1.8 updated: Revert "[BUG] get flink config file bug fixed. (#4289)" (#4375)

This is an automated email from the ASF dual-hosted git repository.

wolfboys pushed a commit to branch dev-2.1.8
in repository https://gitbox.apache.org/repos/asf/streampark.git


The following commit(s) were added to refs/heads/dev-2.1.8 by this push:
     new 6a1db844a Revert "[BUG] get flink config file bug fixed. (#4289)" (#4375)
6a1db844a is described below

commit 6a1db844aa69345ec1b2da75cf5aa41ca8806a55
Author: alan_rodriguez <54...@qq.com>
AuthorDate: Tue Sep 15 09:27:09 2026 +0800

    Revert "[BUG] get flink config file bug fixed. (#4289)" (#4375)
    
    This reverts commit 81b8161be29dde828febe10ff4b050dde5448c0b.
    
    Co-authored-by: alan.zhu <al...@webeye.com>
---
 .../org/apache/streampark/console/core/entity/FlinkEnv.java   | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/FlinkEnv.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/FlinkEnv.java
index b99e24ece..2cb6cd858 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/FlinkEnv.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/FlinkEnv.java
@@ -23,6 +23,7 @@ import org.apache.streampark.common.util.PropertiesUtils;
 import org.apache.streampark.console.base.exception.ApiAlertException;
 import org.apache.streampark.console.base.exception.ApiDetailException;
 
+import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang3.StringUtils;
 
 import com.baomidou.mybatisplus.annotation.IdType;
@@ -34,6 +35,7 @@ import lombok.Setter;
 
 import java.io.File;
 import java.io.Serializable;
+import java.nio.charset.StandardCharsets;
 import java.util.Date;
 import java.util.Map;
 
@@ -74,7 +76,14 @@ public class FlinkEnv implements Serializable {
   public void doSetFlinkConf() throws ApiDetailException {
     Float version = getVersionNumber();
     File configFile = resolveConfigFile(version);
-    this.flinkConf = configFile.getAbsolutePath();
+
+    try {
+      String flinkConf = FileUtils.readFileToString(configFile, StandardCharsets.UTF_8);
+      this.flinkConf = DeflaterUtils.zipString(flinkConf);
+    } catch (Exception e) {
+      throw new ApiDetailException(
+          "Failed to read Flink configuration file: " + configFile.getAbsolutePath(), e);
+    }
   }
 
   private File resolveConfigFile(Float version) throws ApiAlertException {