airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject airavata git commit: fixing ultrascan jobs with app catalog changes
Date Fri, 14 Nov 2014 17:02:39 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 405d31d89 -> f88204404


fixing ultrascan jobs with app catalog changes


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

Branch: refs/heads/master
Commit: f88204404aa7fc65e793ad98478b6648feda0c12
Parents: 405d31d
Author: Chathuri Wimalasena <kamalasini@gmail.com>
Authored: Fri Nov 14 12:02:26 2014 -0500
Committer: Chathuri Wimalasena <kamalasini@gmail.com>
Committed: Fri Nov 14 12:02:26 2014 -0500

----------------------------------------------------------------------
 .../samples/CreateLaunchExperimentUS3.java      | 100 +++++++++----------
 .../tools/RegisterOGCEUS3Application.java       |   4 +-
 .../gfac/gsissh/util/GFACGSISSHUtils.java       |  17 ++--
 .../airavata/gfac/ssh/util/GFACSSHUtils.java    |   1 -
 4 files changed, 63 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/f8820440/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperimentUS3.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperimentUS3.java
b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperimentUS3.java
index b4f8d98..bbffe62 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperimentUS3.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperimentUS3.java
@@ -44,7 +44,7 @@ import java.util.Set;
 public class CreateLaunchExperimentUS3 {
 	
 	 //FIXME: Read from a config file
-    public static final String THRIFT_SERVER_HOST = "gridfarm005.ucs.indiana.edu";
+    public static final String THRIFT_SERVER_HOST = "localhost";
     public static final int THRIFT_SERVER_PORT = 8930;
     private final static Logger logger = LoggerFactory.getLogger(CreateLaunchExperiment.class);
     private static final String DEFAULT_USER = "default.registry.user";
@@ -54,9 +54,9 @@ public class CreateLaunchExperimentUS3 {
             final Airavata.Client airavata = AiravataClientFactory.createAiravataClient(THRIFT_SERVER_HOST,
THRIFT_SERVER_PORT);
             System.out.println("API version is " + airavata.getAPIVersion());
 //            addDescriptors();
-//            final String expId = createUS3ExperimentForTrestles(airavata);
+            final String expId = createUS3ExperimentForTrestles(airavata);
 //            final String expId = createUS3ExperimentForStampede(airavata);
-            final String expId = createUS3ExperimentForLonestar(airavata);
+//            final String expId = createUS3ExperimentForLonestar(airavata);
 //            final String expId =  createUS3ExperimentForAlamo(airavata);
             System.out.println("Experiment ID : " + expId);
             launchExperiment(airavata, expId);
@@ -66,39 +66,39 @@ public class CreateLaunchExperimentUS3 {
 //            } catch (InterruptedException e) {
 //                e.printStackTrace();  //To change body of catch statement use File | Settings
| File Templates.
 //            }
-            Thread monitor = (new Thread(){
-                 public void run() {
-                     Map<String, JobStatus> jobStatuses = null;
-                     while (true) {
-                         try {
-                             jobStatuses = airavata.getJobStatuses(expId);
-                             Set<String> strings = jobStatuses.keySet();
-                             for (String key : strings) {
-                                 JobStatus jobStatus = jobStatuses.get(key);
-                                 if(jobStatus == null){
-                                     return;
-                                 }else {
-                                     if (JobState.COMPLETE.equals(jobStatus.getJobState()))
{
-                                         System.out.println("Job completed Job ID: " + jobStatus.getJobState().toString());
-                                         return;
-                                     }else{
-                                        System.out.println("Job ID:" + key + jobStatuses.get(key).getJobState().toString());
-                                     }
-                                 }
-                             }
-                             Thread.sleep(20000);
-                         } catch (Exception e) {
-                             e.printStackTrace();  //To change body of catch statement use
File | Settings | File Templates.
-                         }
-                     }
-                 }
-            });
-            monitor.start();
-            try {
-                monitor.join();
-            } catch (InterruptedException e) {
-                e.printStackTrace();  //To change body of catch statement use File | Settings
| File Templates.
-            }
+//            Thread monitor = (new Thread(){
+//                 public void run() {
+//                     Map<String, JobStatus> jobStatuses = null;
+//                     while (true) {
+//                         try {
+//                             jobStatuses = airavata.getJobStatuses(expId);
+//                             Set<String> strings = jobStatuses.keySet();
+//                             for (String key : strings) {
+//                                 JobStatus jobStatus = jobStatuses.get(key);
+//                                 if(jobStatus == null){
+//                                     return;
+//                                 }else {
+//                                     if (JobState.COMPLETE.equals(jobStatus.getJobState()))
{
+//                                         System.out.println("Job completed Job ID: " +
jobStatus.getJobState().toString());
+//                                         return;
+//                                     }else{
+//                                        System.out.println("Job ID:" + key + jobStatuses.get(key).getJobState().toString());
+//                                     }
+//                                 }
+//                             }
+//                             Thread.sleep(20000);
+//                         } catch (Exception e) {
+//                             e.printStackTrace();  //To change body of catch statement
use File | Settings | File Templates.
+//                         }
+//                     }
+//                 }
+//            });
+//            monitor.start();
+//            try {
+//                monitor.join();
+//            } catch (InterruptedException e) {
+//                e.printStackTrace();  //To change body of catch statement use File | Settings
| File Templates.
+//            }
             
 //            airavata.terminateExperiment(expId);
      
@@ -193,7 +193,7 @@ public class CreateLaunchExperimentUS3 {
             InputDataObjectType input = new InputDataObjectType();
             input.setName("input");
             input.setType(DataType.URI);
-            input.setValue("file:///home/airavata/input/hpcinput.tar");
+            input.setValue("file:///home/sgg/chathuri/laptop_backup/airavata/ultrascan_input/hpcinput.tar");
             InputDataObjectType input1 = new InputDataObjectType();
             input1.setName("walltime");
             input1.setType(DataType.STRING);
@@ -224,21 +224,21 @@ public class CreateLaunchExperimentUS3 {
 //            exOut.add(output1);
 //            exOut.add(output2);
 
-           // Project project = ProjectModelUtil.createProject("ultrascan", "ultrascan",
"test project");
-            //String projectId = client.createProject(project);
+            Project project = ProjectModelUtil.createProject("ultrascan", "ultrascan", "test
project");
+            String projectId = client.createProject(project);
 
-            Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment("ultrascan_41574ef5-b054-4d03-ab20-2cfe768d5096",
"ultrascan", "US3ExperimentTrestles", "US3AppTrestles", "ultrascan_e76ab5cf-79f6-44df-a244-10a734183fec",
exInputs);
+            Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment(projectId,
"ultrascan", "US3ExperimentTrestles", "US3AppTrestles", "ultrascan_7ce6cd43-622c-44e0-87c5-fb7a6528c799",
exInputs);
             simpleExperiment.setExperimentOutputs(exOut);
 
-            ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling("trestles.sdsc.xsede.org_1ccc526f-ab74-4a5a-970a-c464cb9def5a",
32, 2, 0, "shared", 30, 0, 0, "uot111");
+            ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling("trestles.sdsc.xsede.org_72b9181b-7156-4975-a386-ed98b4949496",
32, 1, 0, "shared", 30, 0, 0, "sds128");
             UserConfigurationData userConfigurationData = new UserConfigurationData();
             
-            scheduling.setResourceHostId("trestles.sdsc.xsede.org_1ccc526f-ab74-4a5a-970a-c464cb9def5a");
+            scheduling.setResourceHostId("trestles.sdsc.xsede.org_72b9181b-7156-4975-a386-ed98b4949496");
             userConfigurationData.setAiravataAutoSchedule(false);
             userConfigurationData.setOverrideManualScheduledParams(false);
         
             AdvancedOutputDataHandling dataHandling = new AdvancedOutputDataHandling();
-            dataHandling.setOutputDataDir("/home/airavata/output/");
+            dataHandling.setOutputDataDir("/home/sgg/chathuri/laptop_backup/airavata");
             userConfigurationData.setAdvanceOutputDataHandling(dataHandling);
         
             userConfigurationData.setComputationalResourceScheduling(scheduling);
@@ -264,7 +264,7 @@ public class CreateLaunchExperimentUS3 {
             InputDataObjectType input = new InputDataObjectType();
             input.setName("input");
             input.setType(DataType.URI);
-            input.setValue("file:///home/airavata/input/hpcinput.tar");
+            input.setValue("file:///home/sgg/chathuri/laptop_backup/airavata/ultrascan_input/hpcinput.tar");
             InputDataObjectType input1 = new InputDataObjectType();
             input1.setName("walltime");
             input1.setType(DataType.STRING);
@@ -296,15 +296,15 @@ public class CreateLaunchExperimentUS3 {
 //            exOut.add(output1);
 //            exOut.add(output2);
 
-//            Project project = ProjectModelUtil.createProject("project1", "admin", "test
project");
-//            String projectId = client.createProject(project);
+            Project project = ProjectModelUtil.createProject("project1", "admin", "test project");
+            String projectId = client.createProject(project);
 
-            Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment("ultrascan_41574ef5-b054-4d03-ab20-2cfe768d5096",
"ultrascan", "US3ExperimentStampede", "US3AppStampede", "ultrascan_e76ab5cf-79f6-44df-a244-10a734183fec",
exInputs);
+            Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment(projectId,
"ultrascan", "US3ExperimentStampede", "US3AppStampede", "ultrascan_7ce6cd43-622c-44e0-87c5-fb7a6528c799",
exInputs);
             simpleExperiment.setExperimentOutputs(exOut);
 
-            ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling("stampede.tacc.xsede.org_af57850b-103b-49a1-aab2-27cb070d3bd9",
16, 2, 0, "normal", 30, 0, 0, "TG-MCB070039N");
+            ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling("stampede.tacc.xsede.org_e59e046f-e0e1-49c4-8475-2fab2e35d044",
16, 2, 0, "normal", 30, 0, 0, "TG-MCB070039N");
 
-            scheduling.setResourceHostId("stampede.tacc.xsede.org_af57850b-103b-49a1-aab2-27cb070d3bd9");
+            scheduling.setResourceHostId("stampede.tacc.xsede.org_e59e046f-e0e1-49c4-8475-2fab2e35d044");
             UserConfigurationData userConfigurationData = new UserConfigurationData();
            
             userConfigurationData.setAiravataAutoSchedule(false);
@@ -312,7 +312,7 @@ public class CreateLaunchExperimentUS3 {
             userConfigurationData.setComputationalResourceScheduling(scheduling);
         
             AdvancedOutputDataHandling dataHandling = new AdvancedOutputDataHandling();
-            dataHandling.setOutputDataDir("/home/airavata/output/");
+            dataHandling.setOutputDataDir("/home/sgg/chathuri/laptop_backup/airavata");
             userConfigurationData.setAdvanceOutputDataHandling(dataHandling);
         
             simpleExperiment.setUserConfigurationData(userConfigurationData);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f8820440/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterOGCEUS3Application.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterOGCEUS3Application.java
b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterOGCEUS3Application.java
index d6cd8f8..2b7c195 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterOGCEUS3Application.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterOGCEUS3Application.java
@@ -32,8 +32,8 @@ public class RegisterOGCEUS3Application {
 //	public static final String THRIFT_SERVER_HOST = "gridfarm005.ucs.indiana.edu";
 //  public static final int THRIFT_SERVER_PORT = 8930;
 	private static final String DEFAULT_GATEWAY= "default"; 
-	public static final String THRIFT_SERVER_HOST = "gw111.iu.xsede.org";
-	public static final int THRIFT_SERVER_PORT = 9930;		
+	public static final String THRIFT_SERVER_HOST = "localhost";
+	public static final int THRIFT_SERVER_PORT = 8930;
 //    private static final String DEFAULT_GATEWAY = "ultrascan";
     private static Airavata.Client airavataClient;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/f8820440/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
index d040ca4..edd496a 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
@@ -42,10 +42,7 @@ import org.apache.airavata.gsi.ssh.impl.PBSCluster;
 import org.apache.airavata.gsi.ssh.util.CommonUtils;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
 import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
-import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
-import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
-import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
-import org.apache.airavata.model.appcatalog.computeresource.SecurityProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.*;
 import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
 import org.apache.airavata.model.workspace.experiment.TaskDetails;
 import org.slf4j.Logger;
@@ -162,9 +159,17 @@ public class GFACGSISSHUtils {
 
     public static JobDescriptor createJobDescriptor(JobExecutionContext jobExecutionContext,
Cluster cluster) {
         JobDescriptor jobDescriptor = new JobDescriptor();
-        ApplicationContext applicationContext = jobExecutionContext.getApplicationContext();
-        ApplicationDeploymentDescription app = applicationContext.getApplicationDeploymentDescription();
         TaskDetails taskData = jobExecutionContext.getTaskData();
+        ResourceJobManager resourceJobManager = jobExecutionContext.getResourceJobManager();
+        Map<JobManagerCommand, String> jobManagerCommands = resourceJobManager.getJobManagerCommands();
+        if (jobManagerCommands != null && !jobManagerCommands.isEmpty()) {
+            for (JobManagerCommand command : jobManagerCommands.keySet()) {
+                if (command == JobManagerCommand.SUBMISSION) {
+                    String commandVal = jobManagerCommands.get(command);
+                    jobDescriptor.setJobSubmitter(commandVal);
+                }
+            }
+        }
         // this is common for any application descriptor
         jobDescriptor.setCallBackIp(ServerSettings.getIp());
         jobDescriptor.setCallBackPort(ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.GFAC_SERVER_PORT,
"8950"));

http://git-wip-us.apache.org/repos/asf/airavata/blob/f8820440/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
index 00b5e16..1e9b937 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
@@ -215,7 +215,6 @@ public class GFACSSHUtils {
         TaskDetails taskData = jobExecutionContext.getTaskData();
         ResourceJobManager resourceJobManager = jobExecutionContext.getResourceJobManager();
         Map<JobManagerCommand, String> jobManagerCommands = resourceJobManager.getJobManagerCommands();
-        String jobManagerBinPath = resourceJobManager.getJobManagerBinPath();
         if (jobManagerCommands != null && !jobManagerCommands.isEmpty()) {
             for (JobManagerCommand command : jobManagerCommands.keySet()) {
                 if (command == JobManagerCommand.SUBMISSION) {


Mime
View raw message