airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject git commit: More fixes with integration - AIRAVATA-1028
Date Sat, 01 Mar 2014 00:08:52 GMT
Repository: airavata
Updated Branches:
  refs/heads/master bf11984c0 -> 804190816


More fixes with integration - AIRAVATA-1028


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

Branch: refs/heads/master
Commit: 804190816880050e870076da0650a1b04d40b2d5
Parents: bf11984
Author: lahiru <lahiru@apache.org>
Authored: Fri Feb 28 19:08:41 2014 -0500
Committer: lahiru <lahiru@apache.org>
Committed: Fri Feb 28 19:08:41 2014 -0500

----------------------------------------------------------------------
 .../model/util/ExperimentModelUtil.java         |  5 ++
 .../monitor/impl/pull/qstat/QstatMonitor.java   |  3 +
 .../apache/airavata/common/utils/DBUtil.java    |  4 +-
 .../org/apache/airavata/gfac/cpi/GFacImpl.java  | 30 ++++-----
 .../airavata/gfac/provider/GFacProvider.java    |  2 +-
 .../gfac/provider/impl/BESProvider.java         |  3 +-
 .../gfac/provider/impl/GSISSHProvider.java      | 65 +++-----------------
 .../gfac/provider/impl/GramProvider.java        |  4 +-
 .../gfac/provider/impl/HadoopProvider.java      |  3 +-
 .../gfac/provider/impl/LocalProvider.java       |  3 +-
 .../gfac/provider/impl/SSHProvider.java         |  4 +-
 .../server/OrchestratorServerHandler.java       |  2 +-
 .../main/resources/airavata-server.properties   |  6 +-
 .../src/main/resources/monitor.properties       |  8 +--
 .../orchestrator/client/DocumentCreator.java    |  7 ++-
 .../client/OrchestratorClientFactoryTest.java   | 18 +++++-
 .../test/resources/airavata-server.properties   |  6 +-
 .../src/test/resources/monitor.properties       |  4 +-
 .../src/test/resources/orchestrator.properties  |  2 +-
 .../cpi/impl/SimpleOrchestratorImpl.java        | 12 ++--
 .../registry/jpa/impl/ExperimentRegistry.java   | 15 +++++
 21 files changed, 99 insertions(+), 107 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/80419081/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
b/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
index 8e2dda2..412e5f1 100644
--- a/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
+++ b/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
@@ -111,6 +111,11 @@ public class ExperimentModelUtil {
         if (experimentInputs != null){
             taskDetails.setApplicationInputs(experimentInputs);
         }
+
+         List<DataObjectType> experimentOutputs = experiment.getExperimentOutputs();
+        if (experimentOutputs != null){
+            taskDetails.setApplicationOutputs(experimentOutputs);
+        }
         UserConfigurationData configData = experiment.getUserConfigurationData();
         if (configData != null){
             ComputationalResourceScheduling scheduling = configData.getComputationalResourceScheduling();

http://git-wip-us.apache.org/repos/asf/airavata/blob/80419081/modules/airavata-job-monitor/src/main/java/org/apache/airavata/job/monitor/impl/pull/qstat/QstatMonitor.java
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/main/java/org/apache/airavata/job/monitor/impl/pull/qstat/QstatMonitor.java
b/modules/airavata-job-monitor/src/main/java/org/apache/airavata/job/monitor/impl/pull/qstat/QstatMonitor.java
index ddf1d33..eba99f9 100644
--- a/modules/airavata-job-monitor/src/main/java/org/apache/airavata/job/monitor/impl/pull/qstat/QstatMonitor.java
+++ b/modules/airavata-job-monitor/src/main/java/org/apache/airavata/job/monitor/impl/pull/qstat/QstatMonitor.java
@@ -52,6 +52,9 @@ public class QstatMonitor extends PullMonitor implements Runnable {
 
     private MonitorPublisher publisher;
 
+    public QstatMonitor(){
+        connections = new HashMap<String, ResourceConnection>();
+    }
     public QstatMonitor(BlockingQueue<MonitorID> queue, MonitorPublisher publisher)
{
         this.queue = queue;
         this.publisher = publisher;

http://git-wip-us.apache.org/repos/asf/airavata/blob/80419081/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DBUtil.java
----------------------------------------------------------------------
diff --git a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DBUtil.java
b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DBUtil.java
index 967e4fa..f720677 100644
--- a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DBUtil.java
+++ b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DBUtil.java
@@ -314,7 +314,7 @@ public class DBUtil {
      */
     public static DBUtil getCredentialStoreDBUtil() throws ApplicationSettingsException,
IllegalAccessException,
             ClassNotFoundException, InstantiationException {
-
+          /* todo fix this
         String jdbcUrl = ServerSettings.getCredentialStoreDBURL();
         String userName = ServerSettings.getCredentialStoreDBUser();
         String password = ServerSettings.getCredentialStoreDBPassword();
@@ -330,6 +330,8 @@ public class DBUtil {
         dbUtil.init();
 
         return dbUtil;
+        */
+        return null;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/80419081/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
index b6e3983..b84dcb7 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
@@ -115,16 +115,16 @@ public class GFacImpl implements GFac {
         try {
             jobExecutionContext = createJEC(experimentID, taskID);
 
-            submitJob(jobExecutionContext);
+            return  submitJob(jobExecutionContext);
         } catch (Exception e) {
             log.error("Error inovoking the job with experiment ID: " + experimentID);
             throw new GFacException(e);
         }
-        return jobExecutionContext;
     }
 
     private JobExecutionContext createJEC(String experimentID, String taskID) throws Exception
{
-        JobExecutionContext jobExecutionContext;TaskDetails taskData = (TaskDetails) registry.get(DataType.TASK_DETAIL,
taskID);
+        JobExecutionContext jobExecutionContext;
+        TaskDetails taskData = (TaskDetails) registry.get(DataType.TASK_DETAIL, taskID);
         // this is wear our new model and old model is mapping (so serviceName in ExperimentData
and service name in ServiceDescriptor
         // has to be same.
 
@@ -163,8 +163,9 @@ public class GFacImpl implements GFac {
         jobExecutionContext.setInMessageContext(new MessageContext(GFacUtils.getMessageContext(experimentInputs,
                 serviceDescription.getType().getInputParametersArray())));
 
-        HashMap<String, Object> outputData = new HashMap<String, Object>();
-        jobExecutionContext.setOutMessageContext(new MessageContext(outputData));
+        List<DataObjectType> outputData = taskData.getApplicationOutputs();
+        jobExecutionContext.setOutMessageContext(new MessageContext(GFacUtils.getMessageContext(outputData,
+                serviceDescription.getType().getOutputParametersArray())));
 
         jobExecutionContext.setProperty(Constants.PROP_TOPIC, experimentID);
         jobExecutionContext.setExperimentID(experimentID);
@@ -173,7 +174,7 @@ public class GFacImpl implements GFac {
         return jobExecutionContext;
     }
 
-    public void submitJob(JobExecutionContext jobExecutionContext) throws GFacException {
+    public JobExecutionContext submitJob(JobExecutionContext jobExecutionContext) throws
GFacException {
         // We need to check whether this job is submitted as a part of a large workflow.
If yes,
         // we need to setup workflow tracking listerner.
         String workflowInstanceID = null;
@@ -184,10 +185,10 @@ public class GFacImpl implements GFac {
         }
         // Register log event listener. This is required in all scenarios.
         jobExecutionContext.getNotificationService().registerListener(new LoggingListener());
-        schedule(jobExecutionContext);
+        return schedule(jobExecutionContext);
     }
 
-    private void schedule(JobExecutionContext jobExecutionContext) throws GFacException {
+    private JobExecutionContext schedule(JobExecutionContext jobExecutionContext) throws
GFacException {
         // Scheduler will decide the execution flow of handlers and provider which handles
         // the job.
         String experimentID = jobExecutionContext.getExperimentID();
@@ -205,17 +206,15 @@ public class GFacImpl implements GFac {
             GFacProvider provider = jobExecutionContext.getProvider();
             if (provider != null) {
                 initProvider(provider, jobExecutionContext);
-                executeProvider(provider, jobExecutionContext);
+                jobExecutionContext = executeProvider(provider, jobExecutionContext);
                 disposeProvider(provider, jobExecutionContext);
             }
-//            if (experimentID != null){
-//                registry2.changeStatus(jobExecutionContext.getExperimentID(),AiravataJobState.State.OUTHANDLERSDONE);
-//            }
         } catch (Exception e) {
             jobExecutionContext.setProperty(ERROR_SENT, "true");
             jobExecutionContext.getNotifier().publish(new ExecutionFailEvent(e.getCause()));
             throw new GFacException(e.getMessage(), e);
         }
+        return jobExecutionContext;
     }
 
     private void initProvider(GFacProvider provider, JobExecutionContext jobExecutionContext)
throws GFacException {
@@ -226,9 +225,9 @@ public class GFacImpl implements GFac {
         }
     }
 
-    private void executeProvider(GFacProvider provider, JobExecutionContext jobExecutionContext)
throws GFacException {
+    private JobExecutionContext executeProvider(GFacProvider provider, JobExecutionContext
jobExecutionContext) throws GFacException {
         try {
-            provider.execute(jobExecutionContext);
+            return provider.execute(jobExecutionContext);
         } catch (Exception e) {
             throw new GFacException("Error while executing provider " + provider.getClass().getName()
+ " functionality.", e);
         }
@@ -358,7 +357,8 @@ public class GFacImpl implements GFac {
 
             requestData = new RequestData("default");
             try {
-                context = new GSISecurityContext(CredentialReaderFactory.createCredentialStoreReader(),
requestData);
+                //todo fix this
+                context = new GSISecurityContext(null, requestData);
             } catch (Exception e) {
                 throw new GFacException("An error occurred while creating GSI security context",
e);
             }

http://git-wip-us.apache.org/repos/asf/airavata/blob/80419081/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProvider.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProvider.java
index a6d5182..9f5832f 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProvider.java
@@ -43,7 +43,7 @@ public interface GFacProvider {
      * @param jobExecutionContext containing job execution related information.
      * @throws GFacProviderException in case of a error executing the job.
      */
-    void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException;
+    JobExecutionContext execute(JobExecutionContext jobExecutionContext) throws GFacProviderException,
GFacException;
 
     /**
      * Cleans up the acquired resources during initialization and execution of the job.

http://git-wip-us.apache.org/repos/asf/airavata/blob/80419081/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
index 3339beb..df602f9 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
@@ -108,7 +108,7 @@ public class BESProvider implements GFacProvider {
     }
 
 
-	public void execute(JobExecutionContext jobExecutionContext)
+	public JobExecutionContext execute(JobExecutionContext jobExecutionContext)
 			throws GFacProviderException {
         UnicoreHostType host = (UnicoreHostType) jobExecutionContext.getApplicationContext().getHostDescription()
                 .getType();
@@ -261,6 +261,7 @@ public class BESProvider implements GFacProvider {
                 log.warn("Cannot destroy temporary SMS instance:" + sc.getUrl(), e);
             }
         }
+        return jobExecutionContext;
     }
 
 	private ApplicationJobStatus getApplicationJobStatus(ActivityStatusType activityStatus){

http://git-wip-us.apache.org/repos/asf/airavata/blob/80419081/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GSISSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GSISSHProvider.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GSISSHProvider.java
index d4352c8..3fa695c 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GSISSHProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GSISSHProvider.java
@@ -45,6 +45,7 @@ import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
 import org.apache.airavata.gsi.ssh.impl.JobStatus;
 import org.apache.airavata.gsi.ssh.impl.PBSCluster;
 import org.apache.airavata.gsi.ssh.listener.JobSubmissionListener;
+import org.apache.airavata.model.workspace.experiment.JobDetails;
 import org.apache.airavata.schemas.gfac.FileArrayType;
 import org.apache.airavata.schemas.gfac.HostDescriptionType;
 import org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType;
@@ -64,7 +65,7 @@ public class GSISSHProvider implements GFacProvider {
         //To change body of implemented methods use File | Settings | File Templates.
     }
 
-    public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException,
GFacException {
+    public JobExecutionContext execute(JobExecutionContext jobExecutionContext) throws GFacProviderException,
GFacException {
         log.info("Invoking GSISSH Provider Invoke ...");
         jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
         HostDescriptionType host = jobExecutionContext.getApplicationContext().
@@ -132,63 +133,10 @@ public class GSISSHProvider implements GFacProvider {
             jobDescriptor.setInputValues(inputValues);
 
             log.info(jobDescriptor.toXML());
-            final String jobID = cluster.submitBatchJob(jobDescriptor);
-            log.info("Job Submitted successfully and returned Job ID: " + jobID);
-            jobExecutionContext.getNotifier().publish(new JobIDEvent(jobID));
-
-            final JobSubmissionListener listener = new GSISSHJobSubmissionListener(jobExecutionContext);
-            final Cluster finalCluster = cluster;
-//            try {
-//            // Wait 5 seconds to start the first poll, this is hard coded, user doesn't
have
-//            // to configure this.
-//            Thread.sleep(5000);
-//        } catch (InterruptedException e) {
-//            log.error("Error during job status monitoring");
-//            throw new SSHApiException("Error during job status monitoring", e);
-//        }
-//        // Get the job status first
-            try {
-//
-                Thread t = new Thread() {
-                    @Override
-                    public void run() {
-                        try {
-                            JobStatus jobStatus = finalCluster.getJobStatus(jobID);
-                            listener.statusChanged(jobStatus);
-                            while (true) {
-                                while (!jobStatus.equals(JobStatus.C)) {
-                                    if (!jobStatus.equals(listener.getJobStatus().toString()))
{
-                                        listener.setJobStatus(jobStatus);
-                                        listener.statusChanged(jobStatus);
-                                    }
-                                    Thread.sleep(60000);
-
-                                    jobStatus = finalCluster.getJobStatus(jobID);
-                                }
-                                //Set the job status to Complete
-                                listener.setJobStatus(JobStatus.C);
-                                listener.statusChanged(jobStatus);
-                                break;
-                            }
-                        } catch (InterruptedException e) {
-                            log.error("Error listening to the submitted job", e);
-                        } catch (SSHApiException e) {
-                            log.error("Error listening to the submitted job", e);
-                        }
-                    }
-                };
-                //  This thread runs until the program termination, so that use can provide
-//            // any action in onChange method of the listener, without worrying for waiting
in the caller thread.
-                t.setDaemon(false);
-                t.start();
-            } catch (Exception e) {
-                String error = "Error during job status monitoring";
-                log.error(error);
-                throw new GFacProviderException(error, e);
-            }
-            while (!listener.isJobDone()) {
-                Thread.sleep(10000);
-            }
+            String jobID = cluster.submitBatchJob(jobDescriptor);
+            JobDetails jobDetails = new JobDetails();
+            jobDetails.setJobID(jobID);
+            jobExecutionContext.setJobDetails(jobDetails);
         } catch (SSHApiException e) {
             String error = "Error submitting the job to host " + host.getHostAddress() +
e.getMessage();
             log.error(error);
@@ -198,6 +146,7 @@ public class GSISSHProvider implements GFacProvider {
             log.error(error);
             throw new GFacProviderException(error, e);
         }
+        return jobExecutionContext;
     }
 
     public void dispose(JobExecutionContext jobExecutionContext) throws GFacProviderException,
GFacException {

http://git-wip-us.apache.org/repos/asf/airavata/blob/80419081/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GramProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GramProvider.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GramProvider.java
index 5dc555e..29318a3 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GramProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GramProvider.java
@@ -126,7 +126,7 @@ public class GramProvider implements GFacProvider {
         job.addListener(listener);
     }
 
-    public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException,
GFacException{
+    public JobExecutionContext execute(JobExecutionContext jobExecutionContext) throws GFacProviderException,
GFacException{
         jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
         GlobusHostType host = (GlobusHostType) jobExecutionContext.getApplicationContext().
                 getHostDescription().getType();
@@ -164,7 +164,7 @@ public class GramProvider implements GFacProvider {
                 }
             }
         }
-
+        return jobExecutionContext;
     }
 
     private void submitJobs(String gateKeeper,

http://git-wip-us.apache.org/repos/asf/airavata/blob/80419081/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/HadoopProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/HadoopProvider.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/HadoopProvider.java
index 956b7b2..fd2e0ba 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/HadoopProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/HadoopProvider.java
@@ -78,7 +78,7 @@ public class HadoopProvider implements GFacProvider{
         }
     }
 
-    public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException
{
+    public JobExecutionContext execute(JobExecutionContext jobExecutionContext) throws GFacProviderException
{
         HadoopApplicationDeploymentDescriptionType hadoopAppDesc =
                 (HadoopApplicationDeploymentDescriptionType)jobExecutionContext
                         .getApplicationContext().getApplicationDeploymentDescription().getType();
@@ -135,6 +135,7 @@ public class HadoopProvider implements GFacProvider{
             logger.error(errMessage, e);
             throw new GFacProviderException(errMessage, e);
         }
+        return jobExecutionContext;
     }
 
     public void dispose(JobExecutionContext jobExecutionContext) throws GFacProviderException
{

http://git-wip-us.apache.org/repos/asf/airavata/blob/80419081/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/LocalProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/LocalProvider.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/LocalProvider.java
index 9d1f204..7a84698 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/LocalProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/LocalProvider.java
@@ -119,7 +119,7 @@ public class LocalProvider implements GFacProvider {
         }
     }
 
-    public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException
{
+    public JobExecutionContext execute(JobExecutionContext jobExecutionContext) throws GFacProviderException
{
         jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
          ApplicationDeploymentDescriptionType app = jobExecutionContext.
                  getApplicationContext().getApplicationDeploymentDescription().getType();
@@ -176,6 +176,7 @@ public class LocalProvider implements GFacProvider {
         } catch (InterruptedException e) {
             throw new GFacProviderException(e.getMessage(), e);
         }
+        return jobExecutionContext;
     }
 
 	private void saveApplicationJob(JobExecutionContext jobExecutionContext)

http://git-wip-us.apache.org/repos/asf/airavata/blob/80419081/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/SSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/SSHProvider.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/SSHProvider.java
index 6d466e4..0125842 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/SSHProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/SSHProvider.java
@@ -101,7 +101,7 @@ public class SSHProvider implements GFacProvider {
         GFacUtils.recordApplicationJob(jobExecutionContext, job);
     }
 
-    public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException
{
+    public JobExecutionContext execute(JobExecutionContext jobExecutionContext) throws GFacProviderException
{
         if (gsiSshProvider == null) {
             ApplicationDeploymentDescriptionType app = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getType();
             Session session = null;
@@ -149,7 +149,7 @@ public class SSHProvider implements GFacProvider {
                 throw new GFacProviderException(e.getMessage(), e);
             }
         }
-
+        return jobExecutionContext;
     }
 
     public void dispose(JobExecutionContext jobExecutionContext) throws GFacProviderException
{

http://git-wip-us.apache.org/repos/asf/airavata/blob/80419081/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 9610a56..9ce3ca3 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
@@ -189,7 +189,7 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface
{
                 }
                 // Launching job for each task
                 String jobID = orchestrator.launchExperiment(experimentId, taskID.getTaskID());
-                log.debug("Job Launched to the resource by GFAC and jobID returned : " +
jobID);
+                log.info("Job Launched to the resource by GFAC and jobID returned : " + jobID);
                 // if the monitoring is pull mode then we add the monitorID for each task
after submitting
                 // the job with the jobID, otherwise we don't need the jobID
                 if(!pushMode) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/80419081/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 881c8da..1a3967f 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
@@ -99,11 +99,11 @@ gfac.embedded=true
 ###########################################################################
 
 myproxy.server=myproxy.teragrid.org
-myproxy.user=username
-myproxy.pass=password
+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=/path/to/trusted/certificates
+trusted.cert.location=/Users/lahirugunathilake/Downloads/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/80419081/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 3353e7b..dc4ebdc 100644
--- a/modules/orchestrator/airavata-orchestrator-service/src/main/resources/monitor.properties
+++ b/modules/orchestrator/airavata-orchestrator-service/src/main/resources/monitor.properties
@@ -1,9 +1,9 @@
-primaryMonitor=org.apache.airavata.job.monitor.impl.push.amqp.AMQPMonitor
-secondaryMonitor=org.apache.airavata.job.monitor.impl.pull.qstat.QstatMonitor
+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
-certificate.path=
+trusted.certificate.location=/Users/lahirugunathilake/Downloads/certificates
+certificate.path=/Users/lahirugunathilake/Downloads/certificates
 myproxy.server=myproxy.teragrid.org
 myproxy.user=ogce
 myproxy.password=

http://git-wip-us.apache.org/repos/asf/airavata/blob/80419081/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/DocumentCreator.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/DocumentCreator.java
b/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/DocumentCreator.java
index 97c516c..51664fc 100644
--- a/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/DocumentCreator.java
+++ b/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/DocumentCreator.java
@@ -169,7 +169,7 @@ public class DocumentCreator {
         projectAccountType.setProjectAccountNumber("sds128");
 
         QueueType queueType = app.addNewQueue();
-        queueType.setQueueName("development");
+        queueType.setQueueName("normal");
 
         app.setCpuCount(1);
         app.setJobType(JobTypeType.SERIAL);
@@ -198,6 +198,7 @@ public class DocumentCreator {
         app.setOutputDataDirectory(tempDir + File.separator + "outputData");
         app.setStandardOutput(tempDir + File.separator + app.getApplicationName().getStringValue()
+ ".stdout");
         app.setStandardError(tempDir + File.separator + app.getApplicationName().getStringValue()
+ ".stderr");
+        app.setMaxMemory(10);
 
 
         try {
@@ -266,13 +267,13 @@ public class DocumentCreator {
         projectAccountType.setProjectAccountNumber("sds128");
 
         QueueType queueType = app.addNewQueue();
-        queueType.setQueueName("development");
+        queueType.setQueueName("normal");
 
         app.setCpuCount(1);
         app.setJobType(JobTypeType.SERIAL);
         app.setNodeCount(1);
         app.setProcessorsPerNode(1);
-
+        app.setMaxWallTime(10);
         /*
            * Use bat file if it is compiled on Windows
            */

http://git-wip-us.apache.org/repos/asf/airavata/blob/80419081/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
b/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
index 6d2dd6a..a20c80e 100644
--- a/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
+++ b/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
@@ -88,10 +88,22 @@ public class OrchestratorClientFactoryTest {
             DataObjectType input = new DataObjectType();
             input.setKey("echo_input");
             input.setType(DataType.STRING.toString());
-            input.setValue("helloWorld");
+            input.setValue("echo_output=Hello World");
             exInputs.add(input);
-            Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment("project1",
"admin", "echoExperiment", "EchoLocal", "EchoLocal", exInputs);
-            ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling("trestles.sdsc.edu",
1, 1, 1, "development", 0, 0, 1, "sds128");
+
+
+            List<DataObjectType> exOut = new ArrayList<DataObjectType>();
+            DataObjectType output = new DataObjectType();
+            output.setKey("echo_output");
+            output.setType(DataType.STRING.toString());
+            output.setValue("");
+            exOut.add(output);
+
+            Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment("project1",
"admin", "echoExperiment", "SimpleEcho2", "SimpleEcho2", exInputs);
+            simpleExperiment.setExperimentOutputs(exOut);
+
+            ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling("trestles.sdsc.edu",
1, 1, 1, "normal", 0, 0, 1, "sds128");
+            scheduling.setResourceHostId("gsissh-trestles");
             UserConfigurationData userConfigurationData = new UserConfigurationData();
             userConfigurationData.setComputationalResourceScheduling(scheduling);
             simpleExperiment.setUserConfigurationData(userConfigurationData);

http://git-wip-us.apache.org/repos/asf/airavata/blob/80419081/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 881c8da..1a3967f 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
@@ -99,11 +99,11 @@ gfac.embedded=true
 ###########################################################################
 
 myproxy.server=myproxy.teragrid.org
-myproxy.user=username
-myproxy.pass=password
+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=/path/to/trusted/certificates
+trusted.cert.location=/Users/lahirugunathilake/Downloads/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/80419081/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 3353e7b..24473dc 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
-certificate.path=
+trusted.certificate.location=/Users/lahirugunathilake/Downloads/certificates
+certificate.path=/Users/lahirugunathilake/Downloads/certificates
 myproxy.server=myproxy.teragrid.org
 myproxy.user=ogce
 myproxy.password=

http://git-wip-us.apache.org/repos/asf/airavata/blob/80419081/modules/orchestrator/airavata-orchestrator-service/src/test/resources/orchestrator.properties
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-service/src/test/resources/orchestrator.properties
b/modules/orchestrator/airavata-orchestrator-service/src/test/resources/orchestrator.properties
index 54147e9..a1c34e6 100644
--- a/modules/orchestrator/airavata-orchestrator-service/src/test/resources/orchestrator.properties
+++ b/modules/orchestrator/airavata-orchestrator-service/src/test/resources/orchestrator.properties
@@ -20,7 +20,7 @@
 job.submitter=org.apache.airavata.orchestrator.core.impl.EmbeddedGFACJobSubmitter
 job.validator=org.apache.airavata.orchestrator.core.validator.impl.SimpleAppDataValidator
 submitter.interval=10000
-threadpool.size=10
+threadpool.size=0
 start.submitter=true
 embedded.mode=true
 enable.validation=false

http://git-wip-us.apache.org/repos/asf/airavata/blob/80419081/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
index f8887d8..d83e5c9 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
@@ -30,6 +30,7 @@ import org.apache.airavata.job.monitor.MonitorID;
 import org.apache.airavata.job.monitor.state.JobStatus;
 import org.apache.airavata.model.util.ExperimentModelUtil;
 import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.model.workspace.experiment.JobState;
 import org.apache.airavata.model.workspace.experiment.TaskDetails;
 import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
 import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
@@ -90,9 +91,8 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator {
                 throw new OrchestratorException("Validation Failed, so Job will not be submitted
to GFAC");
             }
         }
-        if (orchestratorContext.getOrchestratorConfiguration().getThreadPoolSize() == 0)
{
-            jobID = jobSubmitter.submit(experimentID, taskID);
-        }
+
+        jobID = jobSubmitter.submit(experimentID, taskID);
         return jobID;
     }
 
@@ -126,8 +126,10 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator {
 
     @Subscribe
     public void handlePostExperimentTask(JobStatus status) throws OrchestratorException {
-        MonitorID monitorID = status.getMonitorID();
-        jobSubmitter.runAfterJobTask(monitorID.getExperimentID(),monitorID.getTaskID());
+        if(status.getState() == JobState.COMPLETE){
+            MonitorID monitorID = status.getMonitorID();
+            jobSubmitter.runAfterJobTask(monitorID.getExperimentID(), monitorID.getTaskID());
+        }
     }
     public ExecutorService getExecutor() {
         return executor;

http://git-wip-us.apache.org/repos/asf/airavata/blob/80419081/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
index 451303a..04e2330 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
@@ -638,6 +638,10 @@ public class ExperimentRegistry {
             if (applicationInputs != null){
                 addAppInputs(applicationInputs, taskDetail);
             }
+            List<DataObjectType> applicationOutput = taskDetails.getApplicationOutputs();
+            if (applicationOutput != null){
+                addAppOutputs(applicationOutput, taskDetail);
+            }
             ComputationalResourceScheduling taskScheduling = taskDetails.getTaskScheduling();
             if (taskScheduling != null){
                 addComputationScheduling(taskScheduling, taskDetail);
@@ -702,6 +706,17 @@ public class ExperimentRegistry {
             resource.save();
         }
     }
+     public void addAppOutputs (List<DataObjectType> appInputs, TaskDetailResource
taskDetailResource ){
+        for (DataObjectType input :  appInputs){
+            ApplicationInputResource resource = (ApplicationInputResource)taskDetailResource.create(ResourceType.APPLICATION_OUTPUT);
+            resource.setTaskDetailResource(taskDetailResource);
+            resource.setInputKey(input.getKey());
+            resource.setValue(input.getValue());
+            resource.setInputType(input.getType());
+            resource.setMetadata(input.getMetaData());
+            resource.save();
+        }
+    }
 
     public void updateAppOutputs (List<DataObjectType> appOutputs, String taskId )
{
         try {


Mime
View raw message