airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [1/4] airavata git commit: fixing NPE at launch method
Date Tue, 09 Feb 2016 16:06:12 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 2bab21895 -> caca2fe6d


fixing NPE at launch method


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

Branch: refs/heads/master
Commit: 54bb7192567f48c4d0a3b7b6c73b07ddb3d36a2a
Parents: 4c79077
Author: Chathuri Wimalasena <chathuri@apache.org>
Authored: Mon Feb 8 13:29:27 2016 -0500
Committer: Chathuri Wimalasena <chathuri@apache.org>
Committed: Mon Feb 8 13:29:27 2016 -0500

----------------------------------------------------------------------
 .../orchestrator/server/OrchestratorServerHandler.java   | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/54bb7192/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
b/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
index 977191e..db36ce6 100644
--- a/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
+++ b/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
@@ -141,6 +141,12 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface
{
 			String experimentCancelNode = ZKPaths.makePath(experimentNodePath, ZkConstants.ZOOKEEPER_CANCEL_LISTENER_NODE);
 			ZKPaths.mkdirs(curatorClient.getZookeeperClient().getZooKeeper(), experimentCancelNode);
 
+            experiment = (ExperimentModel) experimentCatalog.get(ExperimentCatalogModelType.EXPERIMENT,
experimentId);
+            if (experiment == null) {
+                log.error(experimentId, "Error retrieving the Experiment by the given experimentID:
{} ", experimentId);
+                return false;
+            }
+
 			ComputeResourcePreference computeResourcePreference = appCatalog.getGatewayProfile().
 					getComputeResourcePreference(gatewayId,
 							experiment.getUserConfigurationData().getComputationalResourceScheduling().getResourceHostId());
@@ -159,11 +165,6 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface
{
 			if (executionType == ExperimentType.SINGLE_APPLICATION) {
 				//its an single application execution experiment
 				List<ProcessModel> processes = orchestrator.createProcesses(experimentId, gatewayId);
-				experiment = (ExperimentModel) experimentCatalog.get(ExperimentCatalogModelType.EXPERIMENT,
experimentId);
-				if (experiment == null) {
-					log.error(experimentId, "Error retrieving the Experiment by the given experimentID:
{} ", experimentId);
-					return false;
-				}
 				for (ProcessModel processModel : processes){
 					String taskDag = orchestrator.createAndSaveTasks(gatewayId, processModel, experiment.getUserConfigurationData().isAiravataAutoSchedule());
 					processModel.setTaskDag(taskDag);


Mime
View raw message