Repository: airavata Updated Branches: refs/heads/master adc3cc532 -> 44fb8f904
checking status Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/44fb8f90 Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/44fb8f90 Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/44fb8f90 Branch: refs/heads/master Commit: 44fb8f904dce39d2a185cdccde4c7fc2df6bcbb3 Parents: adc3cc5 Author: chathuri <[email protected]> Authored: Tue Mar 4 10:53:03 2014 -0500 Committer: chathuri <[email protected]> Committed: Tue Mar 4 10:53:03 2014 -0500 ---------------------------------------------------------------------- .../server/handler/AiravataServerHandler.java | 25 ++++++++++++-------- .../airavata/job/monitor/util/X509Helper.java | 2 +- .../main/resources/airavata-server.properties | 2 +- .../src/main/resources/monitor.properties | 4 ++-- .../test/resources/airavata-server.properties | 2 +- .../src/test/resources/monitor.properties | 4 ++-- .../test/resources/airavata-server.properties | 2 +- 7 files changed, 23 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/44fb8f90/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java index 9a9753e..fda468f 100644 --- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java +++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java @@ -35,6 +35,7 @@ import org.apache.airavata.registry.cpi.ChildDataType; import org.apache.airavata.registry.cpi.DataType; import org.apache.airavata.registry.cpi.ParentDataType; import org.apache.airavata.registry.cpi.Registry; +import org.apache.airavata.registry.cpi.utils.Constants; import org.apache.thrift.TException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -42,6 +43,7 @@ import org.slf4j.LoggerFactory; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Objects; public class AiravataServerHandler implements Airavata.Iface { @@ -228,16 +230,19 @@ public class AiravataServerHandler implements Airavata.Iface { Map<String, JobStatus> jobStatus = new HashMap<String, JobStatus>(); try { registry = RegistryFactory.getDefaultRegistry(); - List<WorkflowNodeDetails> workflowNodes = (List<WorkflowNodeDetails>)registry.get(DataType.WORKFLOW_NODE_DETAIL, airavataExperimentId); - if (workflowNodes != null){ - for (WorkflowNodeDetails wf : workflowNodes){ - List<TaskDetails> taskDetails = (List<TaskDetails>)registry.get(DataType.TASK_DETAIL, wf.getNodeInstanceId()); - if (taskDetails != null){ - for (TaskDetails ts : taskDetails){ - List<JobDetails> jobDetails = (List<JobDetails>)registry.get(DataType.JOB_DETAIL, ts.getTaskID()); - if (jobDetails != null){ - for (JobDetails job : jobDetails){ - jobStatus.put(job.getJobID(), job.getJobStatus()); + List<Object> workflowNodes = registry.get(DataType.WORKFLOW_NODE_DETAIL, Constants.FieldConstants.WorkflowNodeConstants.EXPERIMENT_ID, airavataExperimentId); + if (workflowNodes != null && !workflowNodes.isEmpty()){ + for (Object wf : workflowNodes){ + String nodeInstanceId = ((WorkflowNodeDetails) wf).getNodeInstanceId(); + List<Object> taskDetails = registry.get(DataType.TASK_DETAIL, Constants.FieldConstants.TaskDetailConstants.NODE_ID, nodeInstanceId); + if (taskDetails != null && !taskDetails.isEmpty()){ + for (Object ts : taskDetails){ + String taskID = ((TaskDetails) ts).getTaskID(); + List<Object> jobDetails = registry.get(DataType.JOB_DETAIL, Constants.FieldConstants.JobDetaisConstants.TASK_ID, taskID); + if (jobDetails != null && !jobDetails.isEmpty()){ + for (Object job : jobDetails){ + String jobID = ((JobDetails) job).getJobID(); + jobStatus.put(jobID, ((JobDetails) job).getJobStatus()); } } } http://git-wip-us.apache.org/repos/asf/airavata/blob/44fb8f90/modules/airavata-job-monitor/src/main/java/org/apache/airavata/job/monitor/util/X509Helper.java ---------------------------------------------------------------------- diff --git a/modules/airavata-job-monitor/src/main/java/org/apache/airavata/job/monitor/util/X509Helper.java b/modules/airavata-job-monitor/src/main/java/org/apache/airavata/job/monitor/util/X509Helper.java index 63c5172..532e3f1 100644 --- a/modules/airavata-job-monitor/src/main/java/org/apache/airavata/job/monitor/util/X509Helper.java +++ b/modules/airavata-job-monitor/src/main/java/org/apache/airavata/job/monitor/util/X509Helper.java @@ -118,7 +118,7 @@ public class X509Helper { KeyStoreException, CertificateException, NoSuchAlgorithmException { - return trustKeyStoreFromCertDir("/Users/lahirugunathilake/Downloads/certificates"); + return trustKeyStoreFromCertDir("/Users/chathuri/dev/airavata/cert/certificates"); } public static KeyStore trustKeyStoreFromCertDir(String certDir) throws IOException, http://git-wip-us.apache.org/repos/asf/airavata/blob/44fb8f90/modules/orchestrator/airavata-orchestrator-service/src/main/resources/airavata-server.properties ---------------------------------------------------------------------- diff --git a/modules/orchestrator/airavata-orchestrator-service/src/main/resources/airavata-server.properties b/modules/orchestrator/airavata-orchestrator-service/src/main/resources/airavata-server.properties index f5ea35f..0c24c51 100644 --- a/modules/orchestrator/airavata-orchestrator-service/src/main/resources/airavata-server.properties +++ b/modules/orchestrator/airavata-orchestrator-service/src/main/resources/airavata-server.properties @@ -103,7 +103,7 @@ myproxy.user=ogce myproxy.pass=0Gce3098 myproxy.life=3600 # XSEDE Trusted certificates can be downloaded from https://software.xsede.org/security/xsede-certs.tar.gz -trusted.cert.location=/Users/lahirugunathilake/Downloads/certificates +trusted.cert.location=/Users/chathuri/dev/airavata/cert/certificates # SSH PKI key pair or ssh password can be used SSH based authentication is used. # if user specify both password authentication gets the higher preference http://git-wip-us.apache.org/repos/asf/airavata/blob/44fb8f90/modules/orchestrator/airavata-orchestrator-service/src/main/resources/monitor.properties ---------------------------------------------------------------------- diff --git a/modules/orchestrator/airavata-orchestrator-service/src/main/resources/monitor.properties b/modules/orchestrator/airavata-orchestrator-service/src/main/resources/monitor.properties index 32b55a3..bc9b267 100644 --- a/modules/orchestrator/airavata-orchestrator-service/src/main/resources/monitor.properties +++ b/modules/orchestrator/airavata-orchestrator-service/src/main/resources/monitor.properties @@ -2,8 +2,8 @@ secondaryMonitor=org.apache.airavata.job.monitor.impl.push.amqp.AMQPMonitor primaryMonitor=org.apache.airavata.job.monitor.impl.pull.qstat.QstatMonitor amqp.hosts=info1.dyn.teragrid.org,info2.dyn.teragrid.org connection.name=xsede_private -trusted.certificate.location=/Users/lahirugunathilake/Downloads/certificates -certificate.path=/Users/lahirugunathilake/Downloads/certificates +trusted.certificate.location=/Users/chathuri/dev/airavata/cert/certificates +certificate.path=/Users/chathuri/dev/airavata/cert/certificates myproxy.server=myproxy.teragrid.org myproxy.user=ogce myproxy.password=0Gce3098 http://git-wip-us.apache.org/repos/asf/airavata/blob/44fb8f90/modules/orchestrator/airavata-orchestrator-service/src/test/resources/airavata-server.properties ---------------------------------------------------------------------- diff --git a/modules/orchestrator/airavata-orchestrator-service/src/test/resources/airavata-server.properties b/modules/orchestrator/airavata-orchestrator-service/src/test/resources/airavata-server.properties index 1a3967f..dff7feb 100644 --- a/modules/orchestrator/airavata-orchestrator-service/src/test/resources/airavata-server.properties +++ b/modules/orchestrator/airavata-orchestrator-service/src/test/resources/airavata-server.properties @@ -103,7 +103,7 @@ myproxy.user=ogce myproxy.pass= myproxy.life=3600 # XSEDE Trusted certificates can be downloaded from https://software.xsede.org/security/xsede-certs.tar.gz -trusted.cert.location=/Users/lahirugunathilake/Downloads/certificates +trusted.cert.location=/Users/chathuri/dev/airavata/cert/certificates # SSH PKI key pair or ssh password can be used SSH based authentication is used. # if user specify both password authentication gets the higher preference http://git-wip-us.apache.org/repos/asf/airavata/blob/44fb8f90/modules/orchestrator/airavata-orchestrator-service/src/test/resources/monitor.properties ---------------------------------------------------------------------- diff --git a/modules/orchestrator/airavata-orchestrator-service/src/test/resources/monitor.properties b/modules/orchestrator/airavata-orchestrator-service/src/test/resources/monitor.properties index 24473dc..ee4596e 100644 --- a/modules/orchestrator/airavata-orchestrator-service/src/test/resources/monitor.properties +++ b/modules/orchestrator/airavata-orchestrator-service/src/test/resources/monitor.properties @@ -2,8 +2,8 @@ primaryMonitor=org.apache.airavata.job.monitor.impl.push.amqp.AMQPMonitor secondaryMonitor=org.apache.airavata.job.monitor.impl.pull.qstat.QstatMonitor amqp.hosts=info1.dyn.teragrid.org,info2.dyn.teragrid.org connection.name=xsede_private -trusted.certificate.location=/Users/lahirugunathilake/Downloads/certificates -certificate.path=/Users/lahirugunathilake/Downloads/certificates +trusted.certificate.location=/Users/chathuri/dev/airavata/cert/certificates +certificate.path=/Users/chathuri/dev/airavata/cert/certificates myproxy.server=myproxy.teragrid.org myproxy.user=ogce myproxy.password= http://git-wip-us.apache.org/repos/asf/airavata/blob/44fb8f90/modules/orchestrator/orchestrator-core/src/test/resources/airavata-server.properties ---------------------------------------------------------------------- diff --git a/modules/orchestrator/orchestrator-core/src/test/resources/airavata-server.properties b/modules/orchestrator/orchestrator-core/src/test/resources/airavata-server.properties index be41625..5543448 100644 --- a/modules/orchestrator/orchestrator-core/src/test/resources/airavata-server.properties +++ b/modules/orchestrator/orchestrator-core/src/test/resources/airavata-server.properties @@ -103,7 +103,7 @@ myproxy.user=ogce myproxy.pass= myproxy.life=3600 # XSEDE Trusted certificates can be downloaded from https://software.xsede.org/security/xsede-certs.tar.gz -trusted.cert.location=/Users/lahirugunathilake/Downloads/certificates +trusted.cert.location=/Users/chathuri/dev/airavata/cert/certificates # SSH PKI key pair or ssh password can be used SSH based authentication is used. # if user specify both password authentication gets the higher preference
