Repository: airavata Updated Branches: refs/heads/master 9c5d4bf24 -> cf945f01a
Changing SSHHosts to also have HPCApptypes and adding appdesc to appcontext Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/76fb56db Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/76fb56db Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/76fb56db Branch: refs/heads/master Commit: 76fb56db39a6cabc1168ceda7d8f2902b0efc7ed Parents: 3630458 Author: Suresh Marru <[email protected]> Authored: Tue Jul 8 11:59:46 2014 -0400 Committer: Suresh Marru <[email protected]> Committed: Tue Jul 8 11:59:46 2014 -0400 ---------------------------------------------------------------------- .../airavata/gfac/core/cpi/BetterGfacImpl.java | 22 +++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/76fb56db/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java ---------------------------------------------------------------------- diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java index 04a7714..397247f 100644 --- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java +++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java @@ -260,6 +260,7 @@ public class BetterGfacImpl implements GFac { ServiceDescription legacyServiceDescription = new ServiceDescription(); ServiceDescriptionType legacyServiceDescType = legacyServiceDescription.getType(); ApplicationDescription legacyAppDescription = new ApplicationDescription(); + ApplicationDeploymentDescriptionType legacyAppDescType = legacyAppDescription.getType(); HostDescription legacyHostDescription= new HostDescription(); HostDescriptionType legacyHostDescType = legacyHostDescription.getType(); @@ -332,8 +333,8 @@ public class BetterGfacImpl implements GFac { resourceJobManager = sshJobSubmission.getResourceJobManager(); switch (sshJobSubmission.getSecurityProtocol()){ case GSI: - legacyHostDescription.getType().changeType(GsisshHostType.type); - ((GsisshHostType) legacyHostDescription.getType()).setJobManager + legacyHostDescType.changeType(GsisshHostType.type); + ((GsisshHostType) legacyHostDescType).setJobManager (resourceJobManager.getResourceJobManagerType().name()); ((GsisshHostType) legacyHostDescType).setInstalledPath(resourceJobManager.getJobManagerBinPath()); // applicationDescription.setInstalledParentPath(resourceJobManager.getJobManagerBinPath()); @@ -353,11 +354,11 @@ public class BetterGfacImpl implements GFac { /////////////////////---------------- APPLICATION DESCRIPTOR ---------------------///////////////////////// //Fetch deployment information and fill-in legacy doc - legacyAppDescription.getType().addNewApplicationName().setStringValue(applicationDeployment.getAppDeploymentDescription()); - legacyAppDescription.getType().setExecutableLocation(applicationDeployment.getExecutablePath()); - if (legacyHostDescription.getType() instanceof GsisshHostType){ - legacyAppDescription.getType().changeType(HpcApplicationDeploymentType.type); - HpcApplicationDeploymentType legacyHPCAppDescType = (HpcApplicationDeploymentType) legacyAppDescription.getType(); + legacyAppDescType.addNewApplicationName().setStringValue(applicationDeployment.getAppDeploymentDescription()); + legacyAppDescType.setExecutableLocation(applicationDeployment.getExecutablePath()); + if ((legacyHostDescType instanceof GsisshHostType) || (legacyHostDescType instanceof SSHHostType)){ + legacyAppDescType.changeType(HpcApplicationDeploymentType.type); + HpcApplicationDeploymentType legacyHPCAppDescType = (HpcApplicationDeploymentType) legacyAppDescType; switch (applicationDeployment.getParallelism()) { case SERIAL: legacyHPCAppDescType.setJobType(JobTypeType.SERIAL); @@ -381,7 +382,7 @@ public class BetterGfacImpl implements GFac { ProjectAccountType projectAccountType = legacyHPCAppDescType.addNewProjectAccount(); projectAccountType.setProjectAccountNumber(gatewayResourcePreferences.getAllocationProjectNumber()); } - legacyAppDescription.getType().setScratchWorkingDirectory(gatewayResourcePreferences.getScratchLocation()); + legacyAppDescType.setScratchWorkingDirectory(gatewayResourcePreferences.getScratchLocation()); //Fetch from gateway profile //hostDescription.getType().setHostAddress(computeResource.getIpAddresses().iterator().next()); @@ -409,15 +410,16 @@ public class BetterGfacImpl implements GFac { // applicationContext.setApplicationDeploymentDescription(applicationDescription); applicationContext.setHostDescription(legacyHostDescription); applicationContext.setServiceDescription(legacyServiceDescription); + applicationContext.setApplicationDeploymentDescription(legacyAppDescription); jobExecutionContext.setApplicationContext(applicationContext); List<DataObjectType> experimentInputs = taskData.getApplicationInputs(); jobExecutionContext.setInMessageContext(new MessageContext(GFacUtils.getMessageContext(experimentInputs, - legacyServiceDescription.getType().getInputParametersArray()))); + legacyServiceDescType.getInputParametersArray()))); List<DataObjectType> outputData = taskData.getApplicationOutputs(); jobExecutionContext.setOutMessageContext(new MessageContext(GFacUtils.getMessageContext(outputData, - legacyServiceDescription.getType().getOutputParametersArray()))); + legacyServiceDescType.getOutputParametersArray()))); jobExecutionContext.setProperty(Constants.PROP_TOPIC, experimentID); jobExecutionContext.setGfac(this);
