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

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


The following commit(s) were added to refs/heads/dev-2.1.4 by this push:
     new 60a2fc41b [Bug] load logback-spring.xml file bug fixed
60a2fc41b is described below

commit 60a2fc41b5e48026a2c737301923d21062f3be01
Author: benjobs <[email protected]>
AuthorDate: Sat Apr 13 13:59:57 2024 +0800

    [Bug] load logback-spring.xml file bug fixed
---
 docker/config.yaml                                 | 22 ++++++++------------
 helm/streampark/templates/configmap.yaml           |  8 ++++----
 helm/streampark/templates/streampark.yml           |  4 ++--
 .../resources/logback.xml => logback-spring.xml    |  0
 .../org/apache/streampark/common/util/Logger.scala |  2 +-
 .../src/main/assembly/assembly.xml                 |  2 +-
 .../src/main/assembly/bin/streampark.sh            |  4 ++--
 .../console/base/config/SpringProperties.java      |  2 +-
 .../src/main/resources/config.yaml                 | 24 ++++++++--------------
 .../resources/{logback.xml => logback-spring.xml}  |  0
 .../streampark/flink/proxy/FlinkShimsProxy.scala   |  4 ++--
 11 files changed, 30 insertions(+), 42 deletions(-)

diff --git a/docker/config.yaml b/docker/config.yaml
index 7e929ad49..da0809065 100644
--- a/docker/config.yaml
+++ b/docker/config.yaml
@@ -36,21 +36,20 @@ server:
 datasource:
   dialect: h2  #h2, pgsql
   # if datasource.dialect is mysql or pgsql, you need to configure the 
following connection information
-  # mysql/postgresql connect access user
+  # mysql/postgresql connect user
   username:
-  # mysql/postgresql connect access password
+  # mysql/postgresql connect password
   password:
-  # mysql/postgresql connection address
-  # mysql jdbc url example: datasource.url: 
jdbc:mysql://localhost:3306/streampark?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8
-  # postgresql jdbc url example: 
jdbc:postgresql://localhost:5432/streampark?stringtype=unspecified
+  # mysql/postgresql connect jdbcURL
+  # mysql example: datasource.url: 
jdbc:mysql://localhost:3306/streampark?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8
+  # postgresql example: 
jdbc:postgresql://localhost:5432/streampark?stringtype=unspecified
   url:
 
 streampark:
   workspace:
-    # Local workspace, storage of clone projects and compiled projects,Do not 
set under $APP_HOME. Set it to a directory outside of $APP_HOME.
+    # Local workspace, storage directory of clone projects and compiled 
projects,Do not set under $APP_HOME. Set it to a directory outside of $APP_HOME.
     local: /tmp/streampark
-    # The root hdfs path of the jars, Same as yarn.provided.lib.dirs for flink 
on yarn-application
-    # and Same as --jars for spark on yarn
+    # The root hdfs path of the jars, Same as yarn.provided.lib.dirs for flink 
on yarn-application and Same as --jars for spark on yarn
     remote: hdfs:///streampark/
   proxy:
     # lark proxy address, default https://open.feishu.cn
@@ -62,13 +61,8 @@ streampark:
     http-auth: 'simple'  # default simple, or kerberos
   # flink on yarn or spark on yarn, HADOOP_USER_NAME
   hadoop-user-name: hdfs
-  # flink on k8s ingress setting, If an ingress controller is specified in the 
configuration, the ingress class
-  #  kubernetes.io/ingress.class must be specified when creating the ingress, 
since there are often
-  #  multiple ingress controllers in a production environment.
-  flink-k8s.ingress.class: nginx
 
-# flink on yarn or spark on yarn, when the hadoop cluster enable kerberos 
authentication,
-# it is necessary to set up Kerberos authentication related parameters.
+# flink on yarn or spark on yarn, when the hadoop cluster enable kerberos 
authentication, it is necessary to set Kerberos authentication parameters.
 security:
   kerberos:
     login:
diff --git a/helm/streampark/templates/configmap.yaml 
b/helm/streampark/templates/configmap.yaml
index 60de7d406..0ec13b8a9 100644
--- a/helm/streampark/templates/configmap.yaml
+++ b/helm/streampark/templates/configmap.yaml
@@ -30,11 +30,11 @@ data:
 {{- if index (.Values.streamParkDefaultConfiguration) "config.yaml" }}
     {{- index (.Values.streamParkDefaultConfiguration) "config.yaml" | nindent 
4 -}}
 {{- end }}
-  logback.xml: |+
+  logback-spring.xml: |+
 {{- if .Values.streamParkDefaultConfiguration.append }}
-    {{- $.Files.Get "conf/streampark-console-config/logback.xml"  | nindent 4 
-}}
+    {{- $.Files.Get "conf/streampark-console-config/logback-spring.xml"  | 
nindent 4 -}}
 {{- end }}
-{{- if index (.Values.streamParkDefaultConfiguration) "logback.xml" }}
-    {{- index (.Values.streamParkDefaultConfiguration) "logback.xml" | nindent 
4 -}}
+{{- if index (.Values.streamParkDefaultConfiguration) "logback-spring.xml" }}
+    {{- index (.Values.streamParkDefaultConfiguration) "logback-spring.xml" | 
nindent 4 -}}
 {{- end }}
 {{- end }}
diff --git a/helm/streampark/templates/streampark.yml 
b/helm/streampark/templates/streampark.yml
index 0ee92a889..0a465be6a 100755
--- a/helm/streampark/templates/streampark.yml
+++ b/helm/streampark/templates/streampark.yml
@@ -93,5 +93,5 @@ spec:
             items:
               - key: config.yaml
                 path: config.yaml
-              - key: logback.xml
-                path: logback.xml
+              - key: logback-spring.xml
+                path: logback-spring.xml
diff --git 
a/streampark-console/streampark-console-service/src/main/resources/logback.xml 
b/logback-spring.xml
similarity index 100%
copy from 
streampark-console/streampark-console-service/src/main/resources/logback.xml
copy to logback-spring.xml
diff --git 
a/streampark-common/src/main/scala/org/apache/streampark/common/util/Logger.scala
 
b/streampark-common/src/main/scala/org/apache/streampark/common/util/Logger.scala
index 583fc91f2..3ce4fd9a7 100644
--- 
a/streampark-common/src/main/scala/org/apache/streampark/common/util/Logger.scala
+++ 
b/streampark-common/src/main/scala/org/apache/streampark/common/util/Logger.scala
@@ -131,7 +131,7 @@ private[this] object LoggerFactory extends 
LoggerFactoryBinder {
   private class ContextInitializer(loggerContext: LoggerContext)
     extends LogBackContextInitializer(loggerContext) {
 
-    val shadedPackage = "org.apache.streampark.shaded"
+    private val shadedPackage = "org.apache.streampark.shaded"
 
     override def configureByResource(url: URL): Unit = {
       Utils.notNull(url, "URL argument cannot be null")
diff --git 
a/streampark-console/streampark-console-service/src/main/assembly/assembly.xml 
b/streampark-console/streampark-console-service/src/main/assembly/assembly.xml
index 6d46c1a44..dc877c5ac 100644
--- 
a/streampark-console/streampark-console-service/src/main/assembly/assembly.xml
+++ 
b/streampark-console/streampark-console-service/src/main/assembly/assembly.xml
@@ -96,7 +96,7 @@
             <fileMode>0755</fileMode>
             <includes>
                 <include>config.yaml</include>
-                <include>logback.xml</include>
+                <include>logback-spring.xml</include>
             </includes>
         </fileSet>
         <fileSet>
diff --git 
a/streampark-console/streampark-console-service/src/main/assembly/bin/streampark.sh
 
b/streampark-console/streampark-console-service/src/main/assembly/bin/streampark.sh
index ec6adeec7..949fb5803 100755
--- 
a/streampark-console/streampark-console-service/src/main/assembly/bin/streampark.sh
+++ 
b/streampark-console/streampark-console-service/src/main/assembly/bin/streampark.sh
@@ -409,7 +409,7 @@ start() {
   eval $NOHUP $_RUNJAVA $JAVA_OPTS \
     -classpath "$APP_CLASSPATH" \
     -Dapp.home="${APP_HOME}" \
-    -Dlogging.config="${APP_CONF}/logback.xml" \
+    -Dlogging.config="${APP_CONF}/logback-spring.xml" \
     -Djava.io.tmpdir="$APP_TMPDIR" \
     $APP_MAIN >> "$APP_OUT" 2>&1 "&"
 
@@ -477,7 +477,7 @@ start_docker() {
   $_RUNJAVA $JAVA_OPTS \
     -classpath "$APP_CLASSPATH" \
     -Dapp.home="${APP_HOME}" \
-    -Dlogging.config="${APP_CONF}/logback.xml" \
+    -Dlogging.config="${APP_CONF}/logback-spring.xml" \
     -Djava.io.tmpdir="$APP_TMPDIR" \
     $APP_MAIN
 
diff --git 
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/config/SpringProperties.java
 
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/config/SpringProperties.java
index 48735f544..174b9e082 100644
--- 
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/config/SpringProperties.java
+++ 
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/config/SpringProperties.java
@@ -55,7 +55,7 @@ public class SpringProperties {
       // 4) datasource
       dataSourceConfig(userConfig, springConfig);
       // 5) system.setProperties
-      springConfig.forEach((k, v) -> System.setProperty(k.toString(), 
v.toString()));
+      springConfig.forEach((k, v) -> SystemPropertyUtils.set(k.toString(), 
v.toString()));
       return springConfig;
     }
   }
diff --git 
a/streampark-console/streampark-console-service/src/main/resources/config.yaml 
b/streampark-console/streampark-console-service/src/main/resources/config.yaml
index 7e929ad49..5edf8cdfe 100644
--- 
a/streampark-console/streampark-console-service/src/main/resources/config.yaml
+++ 
b/streampark-console/streampark-console-service/src/main/resources/config.yaml
@@ -34,23 +34,22 @@ server:
 
 # system database, default h2, mysql|pgsql|h2
 datasource:
-  dialect: h2  #h2, pgsql
+  dialect: h2  #h2, mysql, pgsql
   # if datasource.dialect is mysql or pgsql, you need to configure the 
following connection information
-  # mysql/postgresql connect access user
+  # mysql/postgresql connect user
   username:
-  # mysql/postgresql connect access password
+  # mysql/postgresql connect password
   password:
-  # mysql/postgresql connection address
-  # mysql jdbc url example: datasource.url: 
jdbc:mysql://localhost:3306/streampark?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8
-  # postgresql jdbc url example: 
jdbc:postgresql://localhost:5432/streampark?stringtype=unspecified
+  # mysql/postgresql connect jdbcURL
+  # mysql example: datasource.url: 
jdbc:mysql://localhost:3306/streampark?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8
+  # postgresql example: 
jdbc:postgresql://localhost:5432/streampark?stringtype=unspecified
   url:
 
 streampark:
   workspace:
-    # Local workspace, storage of clone projects and compiled projects,Do not 
set under $APP_HOME. Set it to a directory outside of $APP_HOME.
+    # Local workspace, storage directory of clone projects and compiled 
projects,Do not set under $APP_HOME. Set it to a directory outside of $APP_HOME.
     local: /tmp/streampark
-    # The root hdfs path of the jars, Same as yarn.provided.lib.dirs for flink 
on yarn-application
-    # and Same as --jars for spark on yarn
+    # The root hdfs path of the jars, Same as yarn.provided.lib.dirs for flink 
on yarn-application and Same as --jars for spark on yarn
     remote: hdfs:///streampark/
   proxy:
     # lark proxy address, default https://open.feishu.cn
@@ -62,13 +61,8 @@ streampark:
     http-auth: 'simple'  # default simple, or kerberos
   # flink on yarn or spark on yarn, HADOOP_USER_NAME
   hadoop-user-name: hdfs
-  # flink on k8s ingress setting, If an ingress controller is specified in the 
configuration, the ingress class
-  #  kubernetes.io/ingress.class must be specified when creating the ingress, 
since there are often
-  #  multiple ingress controllers in a production environment.
-  flink-k8s.ingress.class: nginx
 
-# flink on yarn or spark on yarn, when the hadoop cluster enable kerberos 
authentication,
-# it is necessary to set up Kerberos authentication related parameters.
+# flink on yarn or spark on yarn, when the hadoop cluster enable kerberos 
authentication, it is necessary to set Kerberos authentication parameters.
 security:
   kerberos:
     login:
diff --git 
a/streampark-console/streampark-console-service/src/main/resources/logback.xml 
b/streampark-console/streampark-console-service/src/main/resources/logback-spring.xml
similarity index 100%
rename from 
streampark-console/streampark-console-service/src/main/resources/logback.xml
rename to 
streampark-console/streampark-console-service/src/main/resources/logback-spring.xml
diff --git 
a/streampark-flink/streampark-flink-proxy/src/main/scala/org/apache/streampark/flink/proxy/FlinkShimsProxy.scala
 
b/streampark-flink/streampark-flink-proxy/src/main/scala/org/apache/streampark/flink/proxy/FlinkShimsProxy.scala
index 8548fcd15..7de146f59 100644
--- 
a/streampark-flink/streampark-flink-proxy/src/main/scala/org/apache/streampark/flink/proxy/FlinkShimsProxy.scala
+++ 
b/streampark-flink/streampark-flink-proxy/src/main/scala/org/apache/streampark/flink/proxy/FlinkShimsProxy.scala
@@ -76,7 +76,7 @@ object FlinkShimsProxy extends Logger {
   }
 
   // need to load all flink-table dependencies compatible with different 
versions
-  def getVerifySqlLibClassLoader(flinkVersion: FlinkVersion): ClassLoader = {
+  private def getVerifySqlLibClassLoader(flinkVersion: FlinkVersion): 
ClassLoader = {
     logInfo(s"add verify sql lib,flink version: $flinkVersion")
     VERIFY_SQL_CLASS_LOADER_CACHE.getOrElseUpdate(
       s"${flinkVersion.fullVersion}", {
@@ -105,7 +105,7 @@ object FlinkShimsProxy extends Logger {
     )
   }
 
-  def addShimsUrls(flinkVersion: FlinkVersion, addShimUrl: File => Unit): Unit 
= {
+  private def addShimsUrls(flinkVersion: FlinkVersion, addShimUrl: File => 
Unit): Unit = {
     val appHome = System.getProperty(ConfigConst.KEY_APP_HOME)
     require(
       appHome != null,

Reply via email to