airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject git commit: adding another test validator
Date Wed, 07 May 2014 15:26:06 GMT
Repository: airavata
Updated Branches:
  refs/heads/master bee2dac84 -> 956e8d594


adding another test validator


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/956e8d59
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/956e8d59
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/956e8d59

Branch: refs/heads/master
Commit: 956e8d5949f5714273ff1daeb8545367e7aca5d7
Parents: bee2dac
Author: lahiru <lahiru@apache.org>
Authored: Wed May 7 11:25:51 2014 -0400
Committer: lahiru <lahiru@apache.org>
Committed: Wed May 7 11:25:51 2014 -0400

----------------------------------------------------------------------
 .../server/OrchestratorServerHandler.java       |  7 ++++
 .../orchestrator/core/util/SecondValidator.java | 36 ++++++++++++++++++++
 2 files changed, 43 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/956e8d59/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
index f456c65..1024d1c 100644
--- a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
+++ b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
@@ -144,6 +144,13 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface
{
         }
         return false;
     }
+
+    /**
+     * This can be used to cancel a running experiment and store the status to terminated
in registry
+     * @param experimentId
+     * @return
+     * @throws TException
+     */
     public boolean terminateExperiment(String experimentId) throws TException {
     	try {
 			orchestrator.cancelExperiment(experimentId);

http://git-wip-us.apache.org/repos/asf/airavata/blob/956e8d59/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/SecondValidator.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/SecondValidator.java
b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/SecondValidator.java
new file mode 100644
index 0000000..8e76c2e
--- /dev/null
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/SecondValidator.java
@@ -0,0 +1,36 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.orchestrator.core.util;
+
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
+import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
+import org.apache.airavata.orchestrator.core.validator.JobMetadataValidator;
+
+public class SecondValidator implements JobMetadataValidator {
+    public boolean validate(Experiment experiment, WorkflowNodeDetails workflowNodeDetail,
TaskDetails taskID) throws OrchestratorException {
+        if(taskID.getTaskID() == null){
+            return false;
+        }
+        return true;
+    }
+}


Mime
View raw message