You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sa...@apache.org on 2014/07/09 03:19:49 UTC
[1/3] git commit: fixing thrift conversions issues and
gatewayresourceprofile selecting issue
Repository: airavata
Updated Branches:
refs/heads/master 4639e3810 -> 98f60f3b5
fixing thrift conversions issues and gatewayresourceprofile selecting issue
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/d0a8c443
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/d0a8c443
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/d0a8c443
Branch: refs/heads/master
Commit: d0a8c443f491762863057e4a8a125f9ebce7e12a
Parents: de2f7ce
Author: Saminda Wijeratne <sa...@gmail.com>
Authored: Tue Jul 8 21:19:07 2014 -0400
Committer: Saminda Wijeratne <sa...@gmail.com>
Committed: Tue Jul 8 21:19:07 2014 -0400
----------------------------------------------------------------------
.../airavata/gfac/core/cpi/BetterGfacImpl.java | 57 ++++++++++++--------
1 file changed, 35 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/d0a8c443/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 fc146f8..2034452 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
@@ -85,6 +85,7 @@ import org.apache.airavata.schemas.gfac.DataType;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.ZKUtil;
import org.apache.zookeeper.ZooKeeper;
+import org.ogf.schemas.jsdl.hpcpa.HPCProfileApplicationDocument;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xml.sax.SAXException;
@@ -258,19 +259,20 @@ public class BetterGfacImpl implements GFac {
if (gatewayResourcePreferences==null) {
List<String> gatewayProfileIds = appCatalog.getGatewayProfile()
.getGatewayProfileIds(gatewayID);
- if (gatewayProfileIds.size()>0){
- gatewayID=gatewayProfileIds.get(0);
+ for (String profileId : gatewayProfileIds) {
+ gatewayID = profileId;
gatewayResourcePreferences = appCatalog.getGatewayProfile().
getComputeResourcePreference(gatewayID, applicationDeployment.getComputeHostId());
+ if (gatewayResourcePreferences!=null){
+ break;
+ }
}
}
//Create the legacy schema docs to fill-in
ServiceDescription legacyServiceDescription = new ServiceDescription();
ServiceDescriptionType legacyServiceDescType = legacyServiceDescription.getType();
- ApplicationDescription legacyAppDescription = new ApplicationDescription();
- ApplicationDeploymentDescriptionType legacyAppDescType = legacyAppDescription.getType();
- HostDescription legacyHostDescription= new HostDescription();
- HostDescriptionType legacyHostDescType = legacyHostDescription.getType();
+ ApplicationDescription legacyAppDescription = null;
+ HostDescription legacyHostDescription = null;
///////////////SERVICE DESCRIPTOR///////////////////////////////
//Fetch the application inputs and outputs from the app interface and create the legacy service description.
@@ -324,13 +326,11 @@ public class BetterGfacImpl implements GFac {
////////////////////----------- HOST DESCRIPTOR -----------------//////////////////////
//Fetch the host description details and fill-in legacy doc
- legacyHostDescType.setHostName(computeResource.getHostName());
- legacyHostDescType.setHostAddress(computeResource.getHostName());
-
ResourceJobManager resourceJobManager = null;
for (JobSubmissionInterface jobSubmissionInterface : computeResource.getJobSubmissionInterfaces()){
switch(jobSubmissionInterface.getJobSubmissionProtocol()){
case LOCAL:
+ legacyHostDescription= new HostDescription();
LOCALSubmission localSubmission =
appCatalog.getComputeResource().getLocalJobSubmission(jobSubmissionInterface.getJobSubmissionInterfaceId());
resourceJobManager = localSubmission.getResourceJobManager();
@@ -341,17 +341,18 @@ public class BetterGfacImpl implements GFac {
resourceJobManager = sshJobSubmission.getResourceJobManager();
switch (sshJobSubmission.getSecurityProtocol()){
case GSI:
- legacyHostDescType.changeType(GsisshHostType.type);
- ((GsisshHostType) legacyHostDescType).setJobManager
+ legacyHostDescription= new HostDescription(GsisshHostType.type);
+ ((GsisshHostType) legacyHostDescription.getType()).setJobManager
(resourceJobManager.getResourceJobManagerType().name());
- ((GsisshHostType) legacyHostDescType).setInstalledPath(resourceJobManager.getJobManagerBinPath());
+ ((GsisshHostType) legacyHostDescription.getType()).setInstalledPath(resourceJobManager.getJobManagerBinPath());
// applicationDescription.setInstalledParentPath(resourceJobManager.getJobManagerBinPath());
- ((GsisshHostType) legacyHostDescType).setPort(sshJobSubmission.getSshPort());
+ ((GsisshHostType) legacyHostDescription.getType()).setPort(sshJobSubmission.getSshPort());
break;
case SSH_KEYS:
- legacyHostDescType.changeType(SSHHostType.type);
+ legacyHostDescription= new HostDescription(SSHHostType.type);
break;
default:
+ legacyHostDescription= new HostDescription(SSHHostType.type);
break;
}
break;
@@ -359,21 +360,28 @@ public class BetterGfacImpl implements GFac {
break;
}
}
-
+ HostDescriptionType legacyHostDescType = legacyHostDescription.getType();
+ legacyHostDescType.setHostName(computeResource.getHostName());
+ String ipAddress = computeResource.getHostName();
+ if (computeResource.getIpAddresses()!=null && computeResource.getIpAddresses().size()>0){
+ ipAddress=computeResource.getIpAddresses().iterator().next();
+ } else if (computeResource.getHostAliases()!=null && computeResource.getHostAliases().size()>0){
+ ipAddress=computeResource.getHostAliases().iterator().next();
+ }
+ legacyHostDescType.setHostAddress(ipAddress);
+
/////////////////////---------------- APPLICATION DESCRIPTOR ---------------------/////////////////////////
//Fetch deployment information and fill-in legacy doc
- legacyAppDescType.addNewApplicationName().setStringValue(applicationDeployment.getAppDeploymentDescription());
- legacyAppDescType.setExecutableLocation(applicationDeployment.getExecutablePath());
if ((legacyHostDescType instanceof GsisshHostType) || (legacyHostDescType instanceof SSHHostType)){
- legacyAppDescType.changeType(HpcApplicationDeploymentType.type);
- HpcApplicationDeploymentType legacyHPCAppDescType = (HpcApplicationDeploymentType) legacyAppDescType;
+ legacyAppDescription=new ApplicationDescription(HpcApplicationDeploymentType.type);
+ HpcApplicationDeploymentType legacyHPCAppDescType = (HpcApplicationDeploymentType) legacyAppDescription.getType();
switch (applicationDeployment.getParallelism()) {
case SERIAL:
- legacyHPCAppDescType.setJobType(JobTypeType.SERIAL);
+ legacyHPCAppDescType.setJobType(JobTypeType.SERIAL); break;
case MPI:
- legacyHPCAppDescType.setJobType(JobTypeType.MPI);
+ legacyHPCAppDescType.setJobType(JobTypeType.MPI); break;
case OPENMP:
- legacyHPCAppDescType.setJobType(JobTypeType.OPEN_MP);
+ legacyHPCAppDescType.setJobType(JobTypeType.OPEN_MP); break;
default:
break;
}
@@ -389,7 +397,12 @@ public class BetterGfacImpl implements GFac {
}
ProjectAccountType projectAccountType = legacyHPCAppDescType.addNewProjectAccount();
projectAccountType.setProjectAccountNumber(gatewayResourcePreferences.getAllocationProjectNumber());
+ }else{
+ legacyAppDescription = new ApplicationDescription();
}
+ ApplicationDeploymentDescriptionType legacyAppDescType = legacyAppDescription.getType();
+ legacyAppDescType.addNewApplicationName().setStringValue(applicationDeployment.getAppDeploymentDescription());
+ legacyAppDescType.setExecutableLocation(applicationDeployment.getExecutablePath());
if (gatewayResourcePreferences!=null){
legacyAppDescType.setScratchWorkingDirectory(gatewayResourcePreferences.getScratchLocation());
}else{
[2/3] git commit: fixing thrift conversions issues and
gatewayresourceprofile selecting issue
Posted by sa...@apache.org.
fixing thrift conversions issues and gatewayresourceprofile selecting issue
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/fe2fec56
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/fe2fec56
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/fe2fec56
Branch: refs/heads/master
Commit: fe2fec56bb742a493a34425589607a06b137f847
Parents: d0a8c44
Author: Saminda Wijeratne <sa...@gmail.com>
Authored: Tue Jul 8 21:19:16 2014 -0400
Committer: Saminda Wijeratne <sa...@gmail.com>
Committed: Tue Jul 8 21:19:16 2014 -0400
----------------------------------------------------------------------
.../apache/airavata/client/samples/CreateLaunchExperiment.java | 6 +++---
.../catalog/data/util/AppCatalogThriftConversion.java | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/fe2fec56/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index e3c9afc..c18103b 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@ -72,9 +72,9 @@ public class CreateLaunchExperiment {
addDescriptors();
// final String expId = createExperimentForSSHHost(airavata);
-// final String expId = createExperimentForTrestles(airavata);
+ final String expId = createExperimentForTrestles(client);
// final String expId = createExperimentForStampede(airavata);
- final String expId = createExperimentForLocalHost(client);
+// final String expId = createExperimentForLocalHost(client);
// final String expId = createExperimentForLonestar(airavata);
// final String expId = createExperimentWRFTrestles(airavata);
System.out.println("Experiment ID : " + expId);
@@ -228,7 +228,7 @@ public class CreateLaunchExperiment {
exOut.add(output);
Experiment simpleExperiment =
- ExperimentModelUtil.createSimpleExperiment("default", "admin", "echoExperiment", "SimpleEcho2", "SimpleEcho2", exInputs);
+ ExperimentModelUtil.createSimpleExperiment("default", "admin", "echoExperiment", "SimpleEcho2", pbsEchoAppId, exInputs);
simpleExperiment.setExperimentOutputs(exOut);
ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling("trestles.sdsc.edu", 1, 1, 1, "normal", 0, 0, 1, "sds128");
http://git-wip-us.apache.org/repos/asf/airavata/blob/fe2fec56/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
index 0903ebe..6c1cc9c 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
@@ -101,13 +101,13 @@ public class AppCatalogThriftConversion {
JobSubmissionInterfaceResource jsiResource = new JobSubmissionInterfaceResource();
List<Resource> hsiList = jsiResource.get(AbstractResource.JobSubmissionInterfaceConstants.COMPUTE_RESOURCE_ID, resource.getResourceId());
if (hsiList != null && !hsiList.isEmpty()){
- description.setJobSubmissionInterfaces(getJobSubmissionInterfaces(batchQueues));
+ description.setJobSubmissionInterfaces(getJobSubmissionInterfaces(hsiList));
}
DataMovementInterfaceResource dmiResource = new DataMovementInterfaceResource();
List<Resource> dmiList = dmiResource.get(AbstractResource.DataMovementInterfaceConstants.COMPUTE_RESOURCE_ID, resource.getResourceId());
if (dmiList != null && !dmiList.isEmpty()){
- description.setDataMovementInterfaces(getDataMovementInterfaces(batchQueues));
+ description.setDataMovementInterfaces(getDataMovementInterfaces(dmiList));
}
return description;
}
[3/3] git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/airavata
Posted by sa...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/airavata
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/98f60f3b
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/98f60f3b
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/98f60f3b
Branch: refs/heads/master
Commit: 98f60f3b563603d63bbf13231be1ed943e0f4ea4
Parents: fe2fec5 4639e38
Author: Saminda Wijeratne <sa...@gmail.com>
Authored: Tue Jul 8 21:19:34 2014 -0400
Committer: Saminda Wijeratne <sa...@gmail.com>
Committed: Tue Jul 8 21:19:34 2014 -0400
----------------------------------------------------------------------
.../server/handler/AiravataServerHandler.java | 24 +-
.../lib/applicationDeploymentModel_types.cpp | 34 +-
.../lib/applicationDeploymentModel_types.h | 13 +-
.../Model/AppCatalog/AppDeployment/Types.php | 40 +-
.../samples/TestCreateLaunchExperiment.java | 445 ++-----------------
.../appdeployment/ApplicationModule.java | 128 +-----
.../applicationDeploymentModel.thrift | 9 +-
.../client/tools/DocumentCreatorUtils.java | 1 -
8 files changed, 92 insertions(+), 602 deletions(-)
----------------------------------------------------------------------