Author: lahiru
Date: Mon Oct 15 21:18:24 2012
New Revision: 1398528
URL: http://svn.apache.org/viewvc?rev=1398528&view=rev
Log:
Fixing an issue with overriding context header values
Modified:
airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/utils/GramRSLGenerator.java
Modified:
airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/utils/GramRSLGenerator.java
URL:
http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/utils/GramRSLGenerator.java?rev=1398528&r1=1398527&r2=1398528&view=diff
==============================================================================
---
airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/utils/GramRSLGenerator.java
(original)
+++
airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/utils/GramRSLGenerator.java
Mon Oct 15 21:18:24 2012
@@ -121,14 +121,18 @@ public class GramRSLGenerator {
currentContextHeader.getWorkflowSchedulingContext().getApplicationSchedulingContextArray().length
> 0) {
try {
int cpuCount =
currentContextHeader.getWorkflowSchedulingContext().getApplicationSchedulingContextArray()[0].getCpuCount();
- app.setCpuCount(cpuCount);
+ if(cpuCount>0){
+ app.setCpuCount(cpuCount);
+ }
} catch (NullPointerException e) {
log.info("No Value sent in WorkflowContextHeader for CPU
Count, value in the Deployment Descriptor will be used");
context.getExecutionContext().getNotifier().executionFail(context, e, "No Value
sent in WorkflowContextHeader for Node Count, value in the Deployment
Descriptor will be used");
}
try {
int nodeCount =
currentContextHeader.getWorkflowSchedulingContext().getApplicationSchedulingContextArray()[0].getNodeCount();
- app.setNodeCount(nodeCount);
+ if(nodeCount>0){
+ app.setNodeCount(nodeCount);
+ }
} catch (NullPointerException e) {
log.info("No Value sent in WorkflowContextHeader for Node
Count, value in the Deployment Descriptor will be used");
context.getExecutionContext().getNotifier().executionFail(context, e, "No Value
sent in WorkflowContextHeader for Node Count, value in the Deployment
Descriptor will be used");