From c4189c86c33ae5f27ee546ed8e24ce9770c1fc02 Mon Sep 17 00:00:00 2001 From: Zhiguo Wu Date: Fri, 3 Jan 2025 16:33:49 +0800 Subject: [PATCH] adjust code --- .../server/command/job/ServiceStartJob.java | 15 --------------- .../server/command/job/ServiceStopJob.java | 15 --------------- 2 files changed, 30 deletions(-) diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/command/job/ServiceStartJob.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/command/job/ServiceStartJob.java index 9758ee73..85b4959c 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/command/job/ServiceStartJob.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/command/job/ServiceStartJob.java @@ -51,21 +51,6 @@ public void onSuccess() { } } - @Override - public void onFailure() { - super.onFailure(); - - CommandDTO commandDTO = jobContext.getCommandDTO(); - List serviceCommands = commandDTO.getServiceCommands(); - for (ServiceCommandDTO serviceCommand : serviceCommands) { - Long clusterId = commandDTO.getClusterId(); - String serviceName = serviceCommand.getServiceName(); - ServicePO servicePO = serviceDao.findByClusterIdAndName(clusterId, serviceName); - servicePO.setStatus(HealthyStatusEnum.UNHEALTHY.getCode()); - serviceDao.partialUpdateById(servicePO); - } - } - @Override public String getName() { return "Start services"; diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/command/job/ServiceStopJob.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/command/job/ServiceStopJob.java index fcd9c7a0..9919769e 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/command/job/ServiceStopJob.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/command/job/ServiceStopJob.java @@ -51,21 +51,6 @@ public void onSuccess() { } } - @Override - public void onFailure() { - super.onFailure(); - - CommandDTO commandDTO = jobContext.getCommandDTO(); - List serviceCommands = commandDTO.getServiceCommands(); - for (ServiceCommandDTO serviceCommand : serviceCommands) { - Long clusterId = commandDTO.getClusterId(); - String serviceName = serviceCommand.getServiceName(); - ServicePO servicePO = serviceDao.findByClusterIdAndName(clusterId, serviceName); - servicePO.setStatus(HealthyStatusEnum.UNHEALTHY.getCode()); - serviceDao.partialUpdateById(servicePO); - } - } - @Override public String getName() { return "Stop services";