airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msme...@apache.org
Subject airavata git commit: correct usage totalcpucount; proper ingestion of push based data sources in to the generated jsdl
Date Thu, 02 Jul 2015 15:12:22 GMT
Repository: airavata
Updated Branches:
  refs/heads/airavata-0.15-release-branch 4d5d57930 -> c5debce4b


correct usage totalcpucount; proper ingestion of push based data sources
in to the generated jsdl 

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

Branch: refs/heads/airavata-0.15-release-branch
Commit: c5debce4be1c39bcf50af96c6098862e1cd05246
Parents: 4d5d579
Author: msmemon <shahbaz.memon@gmail.com>
Authored: Thu Jul 2 17:12:13 2015 +0200
Committer: msmemon <shahbaz.memon@gmail.com>
Committed: Thu Jul 2 17:12:13 2015 +0200

----------------------------------------------------------------------
 .../gfac/bes/utils/DataTransferrer.java         |  2 +-
 .../gfac/bes/utils/ResourceProcessor.java       | 26 +++++++++++++++++---
 .../gfac/bes/utils/UASDataStagingProcessor.java |  2 +-
 3 files changed, 24 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/c5debce4/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/DataTransferrer.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/DataTransferrer.java
b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/DataTransferrer.java
index 4331f17..15d8485 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/DataTransferrer.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/DataTransferrer.java
@@ -104,7 +104,7 @@ public class DataTransferrer {
 		List<String> inFilePrms = extractInFileParams();
 		for (String uri : inFilePrms) {
 			String fileName = new File(uri).getName();
-				if (uri.startsWith("file")) {
+				if (uri.startsWith("file:")) {
 					try {
 						String uriWithoutProtocol = uri.substring(uri.lastIndexOf("://") + 1, uri.length());
 						FileUploader fileUploader = new FileUploader(uriWithoutProtocol,fileName,Mode.overwrite);

http://git-wip-us.apache.org/repos/asf/airavata/blob/c5debce4/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/ResourceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/ResourceProcessor.java
b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/ResourceProcessor.java
index 296ef9f..85b3b43 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/ResourceProcessor.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/ResourceProcessor.java
@@ -25,7 +25,13 @@ import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.provider.GFacProviderException;
 import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
 import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.cxf.helpers.XMLUtils;
 import org.ggf.schemas.jsdl.x2005.x11.jsdl.JobDefinitionType;
+import org.ggf.schemas.jsdl.x2005.x11.jsdl.ResourcesType;
+
+import de.fzj.unicore.wsrflite.xmlbeans.WSUtilities;
+import eu.unicore.jsdl.extensions.ResourceRequestDocument;
+import eu.unicore.jsdl.extensions.ResourceRequestType;
 
 public class ResourceProcessor {
 
@@ -34,6 +40,7 @@ public class ResourceProcessor {
 		
 		TaskDetails taskData = context.getTaskData();
 		
+		
 		if(taskData != null && taskData.isSetTaskScheduling()){
 			try {
 				
@@ -53,8 +60,6 @@ public class ResourceProcessor {
 					rangeType.setUpperBound(Double.NaN);
 					rangeType.setExact(crs.getNodeCount());
 					JSDLUtils.setTotalResourceCountRequirements(value, rangeType);
-					// set totalcpu count to -1 as we dont need that
-					crs.setTotalCPUCount(0);
 				}
 	
 				if(crs.getWallTimeLimit() > 0) {
@@ -65,13 +70,26 @@ public class ResourceProcessor {
 					cpuTime.setExact(wallTime);
 					JSDLUtils.setIndividualCPUTimeRequirements(value, cpuTime);
 				}
-				
+				// the total cpu count is total cpus per node 
 				if(crs.getTotalCPUCount() > 0) {
 					RangeValueType rangeType = new RangeValueType();
 					rangeType.setLowerBound(Double.NaN);
 					rangeType.setUpperBound(Double.NaN);
 					rangeType.setExact(crs.getTotalCPUCount());
-					JSDLUtils.setTotalCPUCountRequirements(value, rangeType);
+					JSDLUtils.setIndividualCPUCountRequirements(value, rangeType);
+				}
+
+				String qName = crs.getQueueName(); 
+				if(!( qName == null || "".equals(qName) ) ) {
+					// ignore "default" queue names
+					if(! (crs.getQueueName().trim().equalsIgnoreCase("default")) ) {
+						ResourceRequestDocument rqDoc = ResourceRequestDocument.Factory.newInstance();
+						ResourceRequestType rq = rqDoc.addNewResourceRequest();
+						rq.setName("Queue");
+						rq.setValue(qName);
+						ResourcesType res = JSDLUtils.getOrCreateResources(value);
+						WSUtilities.insertAny(rqDoc, res);
+					}
 				}
 				
 			} catch (NullPointerException npe) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/c5debce4/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/UASDataStagingProcessor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/UASDataStagingProcessor.java
b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/UASDataStagingProcessor.java
index efb6eba..c718f5a 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/UASDataStagingProcessor.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/UASDataStagingProcessor.java
@@ -143,7 +143,7 @@ public class UASDataStagingProcessor {
 					continue;
 				}
 				if(input.getType().equals(DataType.URI)){
-					createInURISMSElement(value, smsUrl, input.getValue(), false);
+					createInURISMSElement(value, smsUrl, input.getValue(), true);
 				}
 				else if(input.getType().equals(DataType.STRING) && input.isDataStaged()){
 					createInURISMSElement(value, smsUrl, input.getValue(), false);


Mime
View raw message