You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by di...@apache.org on 2022/01/14 04:06:39 UTC
[airavata] branch ultrascan-mainteinence updated: Avoiding premature helix manager closure
This is an automated email from the ASF dual-hosted git repository.
dimuthuupe pushed a commit to branch ultrascan-mainteinence
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/ultrascan-mainteinence by this push:
new 4b26599 Avoiding premature helix manager closure
4b26599 is described below
commit 4b26599fb71c28217f95c554fe058cb01c7db54d
Author: Dimuthu Wannipurage <di...@gmail.com>
AuthorDate: Thu Jan 13 23:06:29 2022 -0500
Avoiding premature helix manager closure
---
.../helix/impl/task/cancel/WorkflowCancellationTask.java | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/cancel/WorkflowCancellationTask.java b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/cancel/WorkflowCancellationTask.java
index a05bb63..6236a6c 100644
--- a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/cancel/WorkflowCancellationTask.java
+++ b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/cancel/WorkflowCancellationTask.java
@@ -34,7 +34,6 @@ public class WorkflowCancellationTask extends AbstractTask {
super.init(manager, workflowName, jobName, taskName);
try {
-
helixManager = HelixManagerFactory.getZKHelixManager(ServerSettings.getSetting("helix.cluster.name"), taskName,
InstanceType.SPECTATOR, ServerSettings.getZookeeperConnection());
helixManager.connect();
@@ -47,19 +46,18 @@ public class WorkflowCancellationTask extends AbstractTask {
);
taskDriver = new TaskDriver(helixManager);
} catch (Exception e) {
- logger.error("Failed to build Helix Task driver in " + taskName, e);
- throw new RuntimeException("Failed to build Helix Task driver in " + taskName, e);
- } finally {
-
try {
if (helixManager != null) {
if (helixManager.isConnected()) {
helixManager.disconnect();
}
}
- } catch (Exception e) {
- logger.warn("Failed to disconnect helix manager", e);
+ } catch (Exception ex) {
+ logger.warn("Failed to disconnect helix manager", ex);
}
+
+ logger.error("Failed to build Helix Task driver in " + taskName, e);
+ throw new RuntimeException("Failed to build Helix Task driver in " + taskName, e);
}
}