airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject [1/2] git commit: fixing issue with output data handling
Date Wed, 12 Mar 2014 18:31:43 GMT
Repository: airavata
Updated Branches:
  refs/heads/master e8a6d419a -> 0c08b94b8


fixing issue with output data handling


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

Branch: refs/heads/master
Commit: c0f20842c55c36ee56d6e9db9fa3c69dff831989
Parents: 95fb3eb
Author: lahiru <lahiru@apache.org>
Authored: Wed Mar 12 14:30:04 2014 -0400
Committer: lahiru <lahiru@apache.org>
Committed: Wed Mar 12 14:30:04 2014 -0400

----------------------------------------------------------------------
 .../java/org/apache/airavata/gfac/cpi/GFacImpl.java   | 14 ++++++++++++++
 .../airavata/gfac/provider/impl/GSISSHProvider.java   |  2 +-
 2 files changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/c0f20842/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 47dee57..6022885 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
@@ -48,6 +48,7 @@ import org.apache.airavata.gsi.ssh.api.SSHApiException;
 import org.apache.airavata.gsi.ssh.api.ServerInfo;
 import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
 import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
+import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
 import org.apache.airavata.gsi.ssh.api.job.JobManagerConfiguration;
 import org.apache.airavata.gsi.ssh.impl.PBSCluster;
 import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
@@ -55,6 +56,7 @@ import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPublicKeyFileAuthe
 import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
 import org.apache.airavata.gsi.ssh.util.CommonUtils;
 import org.apache.airavata.model.workspace.experiment.DataObjectType;
+import org.apache.airavata.model.workspace.experiment.JobDetails;
 import org.apache.airavata.model.workspace.experiment.TaskDetails;
 import org.apache.airavata.registry.api.AiravataRegistry2;
 import org.apache.airavata.registry.cpi.DataType;
@@ -288,9 +290,21 @@ public class GFacImpl implements GFac {
         try {
             jobExecutionContext = createJEC(experimentID, taskID);
             Scheduler.schedule(jobExecutionContext);
+            ApplicationDescription applicationDeploymentDescription = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
+            TaskDetails taskData = (TaskDetails) registry.get(DataType.TASK_DETAIL, taskID);
+            JobDetails jobDetails = taskData.getJobDetailsList().get(0);
+            String jobDescription = jobDetails.getJobDescription();
+            JobDescriptor jobDescriptor = JobDescriptor.fromXML(jobDescription);
+            applicationDeploymentDescription.getType().setScratchWorkingDirectory(
+                    jobDescriptor.getJobDescriptorDocument().getJobDescriptor().getWorkingDirectory());
+            applicationDeploymentDescription.getType().setInputDataDirectory(jobDescriptor.getJobDescriptorDocument().getJobDescriptor().getInputDirectory());
+            applicationDeploymentDescription.getType().setOutputDataDirectory(jobDescriptor.getJobDescriptorDocument().getJobDescriptor().getOutputDirectory());
+            applicationDeploymentDescription.getType().setStandardError(jobDescriptor.getJobDescriptorDocument().getJobDescriptor().getStandardErrorFile());
+            applicationDeploymentDescription.getType().setStandardOutput(jobDescriptor.getJobDescriptorDocument().getJobDescriptor().getStandardOutFile());
         } catch (Exception e) {
             throw new GFacException(e);
         }
+
         List<GFacHandlerConfig> handlers = jobExecutionContext.getGFacConfiguration().getOutHandlers();
 
         for (GFacHandlerConfig handlerClassName : handlers) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/c0f20842/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 d33e1a3..db5c29a 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
@@ -90,7 +90,7 @@ public class GSISSHProvider extends AbstractProvider implements GFacProvider{
             }
             // This installed path is a mandetory field, because this could change based
on the computing resource
             JobDescriptor jobDescriptor = new JobDescriptor();
-            jobDescriptor.setWorkingDirectory(app.getStaticWorkingDirectory()   );
+            jobDescriptor.setWorkingDirectory(app.getStaticWorkingDirectory());
             jobDescriptor.setShellName("/bin/bash");
             Random random = new Random();
             int i = random.nextInt();


Mime
View raw message