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

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


The following commit(s) were added to refs/heads/dev by this push:
     new 6da165578 [Improve] trigger savepoint improvement (#2679)
6da165578 is described below

commit 6da165578dae34c9d7cc676084314765c689612c
Author: benjobs <[email protected]>
AuthorDate: Sat Apr 22 09:32:17 2023 +0800

    [Improve] trigger savepoint improvement (#2679)
---
 .../streampark/common/util/HadoopConfigUtils.scala       | 15 ++++++++-------
 .../src/components/Table/src/components/TableAction.vue  |  2 +-
 .../src/views/flink/app/View.vue                         |  2 +-
 .../src/views/flink/app/hooks/useAppTableAction.ts       | 16 ++++++++--------
 4 files changed, 18 insertions(+), 17 deletions(-)

diff --git 
a/streampark-common/src/main/scala/org/apache/streampark/common/util/HadoopConfigUtils.scala
 
b/streampark-common/src/main/scala/org/apache/streampark/common/util/HadoopConfigUtils.scala
index 61ffd1d95..36936e54f 100644
--- 
a/streampark-common/src/main/scala/org/apache/streampark/common/util/HadoopConfigUtils.scala
+++ 
b/streampark-common/src/main/scala/org/apache/streampark/common/util/HadoopConfigUtils.scala
@@ -18,11 +18,11 @@ package org.apache.streampark.common.util
 
 import org.apache.streampark.common.fs.LfsOperator
 
-import com.google.common.collect.Maps
 import org.apache.commons.io.{FileUtils => ApacheFileUtils}
 
 import java.io.File
-import java.util.{Collections, Map => JavaMap, Optional => JOption}
+import java.nio.charset.StandardCharsets
+import java.util.{Collections, Map => JavaMap, Optional}
 
 import scala.collection.JavaConversions._
 import scala.collection.JavaConverters._
@@ -48,13 +48,14 @@ object HadoopConfigUtils {
     }
   }
 
-  def getSystemHadoopConfDirAsJava: JOption[String] =
-    JOption.ofNullable(getSystemHadoopConfDir.orNull)
+  def getSystemHadoopConfDirAsJava: Optional[String] =
+    Optional.ofNullable(getSystemHadoopConfDir.orNull)
 
   /** Get Hive configuration directory path from system. */
   def getSystemHiveConfDir: Option[String] = 
Try(FileUtils.getPathFromEnv("HIVE_CONF_DIR")).toOption
 
-  def getSystemHiveConfDirAsJava: JOption[String] = 
JOption.ofNullable(getSystemHiveConfDir.orNull)
+  def getSystemHiveConfDirAsJava: Optional[String] =
+    Optional.ofNullable(getSystemHiveConfDir.orNull)
 
   /**
    * Replace host information with ip of hadoop config file or hive config 
file. Such as
@@ -115,7 +116,7 @@ object HadoopConfigUtils {
           LfsOperator
             .listDir(confDir)
             .filter(f => HADOOP_CLIENT_CONF_FILES.contains(f.getName))
-            .map(f => f.getName -> ApacheFileUtils.readFileToString(f, 
"UTF-8"))
+            .map(f => f.getName -> ApacheFileUtils.readFileToString(f, 
StandardCharsets.UTF_8))
             .toMap
             .asJava)
       .getOrElse(Collections.emptyMap[String, String]())
@@ -128,7 +129,7 @@ object HadoopConfigUtils {
           LfsOperator
             .listDir(confDir)
             .filter(f => HIVE_CLIENT_CONF_FILES.contains(f.getName))
-            .map(f => f.getName -> ApacheFileUtils.readFileToString(f, 
"UTF-8"))
+            .map(f => f.getName -> ApacheFileUtils.readFileToString(f, 
StandardCharsets.UTF_8))
             .toMap
             .asJava)
       .getOrElse(Collections.emptyMap[String, String]())
diff --git 
a/streampark-console/streampark-console-webapp/src/components/Table/src/components/TableAction.vue
 
b/streampark-console/streampark-console-webapp/src/components/Table/src/components/TableAction.vue
index edb1d27ce..09619d602 100644
--- 
a/streampark-console/streampark-console-webapp/src/components/Table/src/components/TableAction.vue
+++ 
b/streampark-console/streampark-console-webapp/src/components/Table/src/components/TableAction.vue
@@ -142,7 +142,7 @@
         return actionColumn?.align ?? 'left';
       });
 
-      function getTooltip(data: string | TooltipProps): TooltipProps {
+      function getTooltip(data: string | TooltipProps) {
         return {
           getPopupContainer: () => unref((table as any)?.wrapRef.value) ?? 
document.body,
           placement: 'bottom',
diff --git 
a/streampark-console/streampark-console-webapp/src/views/flink/app/View.vue 
b/streampark-console/streampark-console-webapp/src/views/flink/app/View.vue
index 6e962781c..ca229a23e 100644
--- a/streampark-console/streampark-console-webapp/src/views/flink/app/View.vue
+++ b/streampark-console/streampark-console-webapp/src/views/flink/app/View.vue
@@ -216,7 +216,7 @@
 
           <template v-if="record['jobType'] === JobTypeEnum.JAR">
             <Badge
-              v-if="record.release == ReleaseStateEnum.NEED_CHECK"
+              v-if="record.release === ReleaseStateEnum.NEED_CHECK"
               class="build-badge"
               count="NEW"
               :title="t('flink.app.view.recheck')"
diff --git 
a/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useAppTableAction.ts
 
b/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useAppTableAction.ts
index a8110e0db..909ffce1e 100644
--- 
a/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useAppTableAction.ts
+++ 
b/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useAppTableAction.ts
@@ -106,14 +106,6 @@ export const useAppTableAction = (
         icon: 'ant-design:pause-circle-outlined',
         onClick: handleCancel.bind(null, record),
       },
-      {
-        tooltip: { title: t('flink.app.operation.savepoint') },
-        ifShow:
-          record.state == AppStateEnum.RUNNING && record['optionState'] == 
OptionStateEnum.NONE,
-        auth: 'savepoint:trigger',
-        icon: 'ant-design:camera-outlined',
-        onClick: handleSavepoint.bind(null, record),
-      },
       {
         tooltip: { title: t('flink.app.operation.detail') },
         auth: 'app:detail',
@@ -129,6 +121,14 @@ export const useAppTableAction = (
         icon: 'ant-design:code-outlined',
         onClick: () => openLogModal(true, { app: record }),
       },
+      {
+        tooltip: { title: t('flink.app.operation.savepoint') },
+        ifShow:
+          record.state == AppStateEnum.RUNNING && record['optionState'] == 
OptionStateEnum.NONE,
+        auth: 'savepoint:trigger',
+        icon: 'ant-design:camera-outlined',
+        onClick: handleSavepoint.bind(null, record),
+      },
       {
         tooltip: { title: t('flink.app.operation.force') },
         ifShow: handleCanStop(record),

Reply via email to