This is an automated email from the ASF dual-hosted git repository.
dimuthuupe pushed a commit to branch staging
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/staging by this push:
new f55bb83 Cleaning up monitoring util
f55bb83 is described below
commit f55bb83596c6d87151118ca20c66746f779590b3
Author: Dimuthu Wannipurage <dimuthu.upeksha2@gmail.com>
AuthorDate: Wed Jan 23 21:11:03 2019 -0500
Cleaning up monitoring util
---
.../helix/impl/task/completing/CompletingTask.java | 7 -------
.../apache/airavata/helix/core/util/MonitoringUtil.java | 17 -----------------
2 files changed, 24 deletions(-)
diff --git a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/completing/CompletingTask.java
b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/completing/CompletingTask.java
index ed9db0e..4e97090 100644
--- a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/completing/CompletingTask.java
+++ b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/completing/CompletingTask.java
@@ -40,13 +40,6 @@ public class CompletingTask extends AiravataTask {
logger.info("Starting completing task for task " + getTaskId() + ", experiment id
" + getExperimentId());
logger.info("Process " + getProcessId() + " successfully completed");
saveAndPublishProcessStatus(ProcessState.COMPLETED);
-
- logger.info("Deleting process level monitoring nodes");
- try {
- MonitoringUtil.deleteProcessSpecificNodes(getCuratorClient(), getProcessId());
- } catch (Exception e) {
- logger.error("Failed to delete process specific nodes but continuing", e);
- }
return onSuccess("Process " + getProcessId() + " successfully completed");
}
diff --git a/modules/airavata-helix/task-core/src/main/java/org/apache/airavata/helix/core/util/MonitoringUtil.java
b/modules/airavata-helix/task-core/src/main/java/org/apache/airavata/helix/core/util/MonitoringUtil.java
index f91258e..b49d508 100644
--- a/modules/airavata-helix/task-core/src/main/java/org/apache/airavata/helix/core/util/MonitoringUtil.java
+++ b/modules/airavata-helix/task-core/src/main/java/org/apache/airavata/helix/core/util/MonitoringUtil.java
@@ -1,26 +1,16 @@
package org.apache.airavata.helix.core.util;
-import org.apache.airavata.model.status.JobState;
-import org.apache.airavata.model.workspace.Gateway;
import org.apache.curator.framework.CuratorFramework;
import org.apache.zookeeper.CreateMode;
-import org.apache.zookeeper.data.Stat;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.util.List;
-
public class MonitoringUtil {
private final static Logger logger = LoggerFactory.getLogger(MonitoringUtil.class);
private static final String PATH_PREFIX = "/airavata";
- private static final String REGISTRY = "/registry/";
-
private static final String TASK = "/task";
-
- private static final String JOBS = "/jobs";
- private static final String WORKFLOWS = "/workflows";
private static final String RETRY = "/retry";
public static int getTaskRetryCount(CuratorFramework curatorClient, String taskId) throws
Exception {
@@ -51,11 +41,4 @@ public class MonitoringUtil {
public static void deleteTaskSpecificNodes(CuratorFramework curatorClient, String takId)
throws Exception {
deleteIfExists(curatorClient, PATH_PREFIX + TASK + "/" + takId + RETRY);
}
-
- public static void deleteProcessSpecificNodes(CuratorFramework curatorClient, String
processId) throws Exception {
-
- deleteIfExists(curatorClient, PATH_PREFIX + REGISTRY + processId + JOBS);
- deleteIfExists(curatorClient, PATH_PREFIX + REGISTRY + processId + WORKFLOWS);
- deleteIfExists(curatorClient, PATH_PREFIX + REGISTRY + processId);
- }
}
|