From f144237f56326dbe3635150958a238d9385c39a5 Mon Sep 17 00:00:00 2001 From: benjobs Date: Sun, 5 Feb 2023 13:00:04 +0800 Subject: [PATCH] [Improve] delete job improvement (#2297) --- .../apache/streampark/console/base/domain/Constant.java | 1 - .../console/core/service/impl/ApplicationServiceImpl.java | 7 ------- 2 files changed, 8 deletions(-) diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/domain/Constant.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/domain/Constant.java index 09d37aeabc..f1d7f6b743 100644 --- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/domain/Constant.java +++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/domain/Constant.java @@ -30,5 +30,4 @@ public class Constant { public static final String TYPE_MENU = "0"; public static final String APP_MENU_ID = "100015"; public static final String APP_DETAIL_MENU_ID = "100018"; - public static final Long FLINK_SAMPLE_APP_ID = 100000L; } diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java index cc9d04b630..f553e72297 100644 --- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java +++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java @@ -34,7 +34,6 @@ import org.apache.streampark.common.util.ThreadUtils; import org.apache.streampark.common.util.Utils; import org.apache.streampark.common.util.YarnUtils; -import org.apache.streampark.console.base.domain.Constant; import org.apache.streampark.console.base.domain.RestRequest; import org.apache.streampark.console.base.exception.ApiAlertException; import org.apache.streampark.console.base.exception.ApiDetailException; @@ -459,12 +458,6 @@ private void removeApp(Application application) { application .getFsOperator() .delete(application.getWorkspace().APP_WORKSPACE().concat("/").concat(appId.toString())); - } catch (Exception e) { - if (!application.getId().equals(Constant.FLINK_SAMPLE_APP_ID)) { - throw e; - } - } - try { // try to delete yarn-application, and leave no trouble. String path = Workspace.of(StorageType.HDFS).APP_WORKSPACE().concat("/").concat(appId.toString());