airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramin...@apache.org
Subject svn commit: r1560514 - in /airavata/trunk/modules/orchestrator/orchestrator-core/src: main/java/org/apache/airavata/orchestrator/core/ main/java/org/apache/airavata/orchestrator/core/model/ main/java/org/apache/airavata/orchestrator/core/utils/ main/re...
Date Wed, 22 Jan 2014 21:23:01 GMT
Author: raminder
Date: Wed Jan 22 21:23:00 2014
New Revision: 1560514

URL: http://svn.apache.org/r1560514
Log:
added request header model

Added:
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/ExperimentConfigurationData.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/ExperimentRequest.java
      - copied, changed from r1560503, airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/ExperimentRequest.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/ResourceScheduling.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/resources/airavata-server.properties
      - copied unchanged from r1560503, airavata/trunk/modules/orchestrator/orchestrator-core/src/main/resources/gateway.properties
Removed:
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/ExperimentRequest.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/resources/gateway.properties
Modified:
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/AbstractOrchestrator.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/NewJobWorker.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/Orchestrator.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/PullBasedOrchestrator.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/SimpleOrchestratorImpl.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorConstants.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/SimpleOrchestratorTest.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/TestWithStoredDescriptors.java

Modified: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/AbstractOrchestrator.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/AbstractOrchestrator.java?rev=1560514&r1=1560513&r2=1560514&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/AbstractOrchestrator.java
(original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/AbstractOrchestrator.java
Wed Jan 22 21:23:00 2014
@@ -29,18 +29,16 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 import java.util.UUID;
-import java.util.concurrent.Executors;
 
 import org.apache.airavata.client.AiravataAPIFactory;
 import org.apache.airavata.client.api.AiravataAPI;
 import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
 import org.apache.airavata.common.exception.AiravataConfigurationException;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.orchestrator.core.context.OrchestratorContext;
 import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
 import org.apache.airavata.orchestrator.core.gfac.GFACInstance;
-import org.apache.airavata.orchestrator.core.job.JobSubmitter;
+import org.apache.airavata.orchestrator.core.model.ExperimentRequest;
+import org.apache.airavata.orchestrator.core.utils.OrchestratorConstants;
 import org.apache.airavata.orchestrator.core.utils.OrchestratorUtils;
 import org.apache.airavata.registry.api.AiravataRegistry2;
 import org.apache.airavata.registry.api.AiravataRegistryFactory;
@@ -130,7 +128,7 @@ public abstract class AbstractOrchestrat
 	
 	//get the registry URL and the credentials from the property file
     protected void setGatewayProperties() {
-        InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("gateway.properties");
+        InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(OrchestratorConstants.AIRAVATA_PROPERTIES);
         Properties properties = new Properties();
         try {
             properties.load(inputStream);
@@ -152,7 +150,7 @@ public abstract class AbstractOrchestrat
        	experimentID = UUID.randomUUID().toString(); 
        }
        try {
-           airavataRegistry.storeExperiment(request.getSubmitterUserName(), experimentID,
request.getApplicationName(), request.getJobRequest());
+           airavataRegistry.storeExperiment(request.getSubmitterUserName(), experimentID,
null, null);
        } catch (RegistryException e) {
            //todo put more meaningful error  message
            logger.error("Failed to create experiment for the request from " + request.getSubmitterUserName());

Modified: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/NewJobWorker.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/NewJobWorker.java?rev=1560514&r1=1560513&r2=1560514&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/NewJobWorker.java
(original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/NewJobWorker.java
Wed Jan 22 21:23:00 2014
@@ -20,17 +20,15 @@
 */
 package org.apache.airavata.orchestrator.core;
 
-import org.apache.airavata.gfac.provider.GFacProvider;
+import java.util.List;
+
 import org.apache.airavata.orchestrator.core.context.OrchestratorContext;
 import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
 import org.apache.airavata.orchestrator.core.gfac.GFACInstance;
 import org.apache.airavata.orchestrator.core.job.JobSubmitter;
-import org.apache.airavata.registry.api.exception.RegistryException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.List;
-
 /*
 This is the worker class to handle the jobs stored in to registry as
 fresh and this will pick those jobs and invoke the defined submitter

Modified: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/Orchestrator.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/Orchestrator.java?rev=1560514&r1=1560513&r2=1560514&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/Orchestrator.java
(original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/Orchestrator.java
Wed Jan 22 21:23:00 2014
@@ -21,6 +21,7 @@
 package org.apache.airavata.orchestrator.core;
 
 import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
+import org.apache.airavata.orchestrator.core.model.ExperimentRequest;
 import org.apache.airavata.registry.api.JobRequest;
 
 /*

Modified: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/PullBasedOrchestrator.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/PullBasedOrchestrator.java?rev=1560514&r1=1560513&r2=1560514&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/PullBasedOrchestrator.java
(original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/PullBasedOrchestrator.java
Wed Jan 22 21:23:00 2014
@@ -20,30 +20,13 @@
 */
 package org.apache.airavata.orchestrator.core;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
-import org.apache.airavata.client.AiravataAPIFactory;
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.common.exception.AiravataConfigurationException;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.AiravataJobState;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.orchestrator.core.context.OrchestratorContext;
 import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
-import org.apache.airavata.orchestrator.core.gfac.GFACInstance;
 import org.apache.airavata.orchestrator.core.job.JobSubmitter;
 import org.apache.airavata.orchestrator.core.utils.OrchestratorUtils;
-import org.apache.airavata.registry.api.AiravataRegistryFactory;
-import org.apache.airavata.registry.api.AiravataUser;
-import org.apache.airavata.registry.api.Gateway;
 import org.apache.airavata.registry.api.JobRequest;
 import org.apache.airavata.registry.api.exception.RegistryException;
 import org.slf4j.Logger;

Modified: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/SimpleOrchestratorImpl.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/SimpleOrchestratorImpl.java?rev=1560514&r1=1560513&r2=1560514&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/SimpleOrchestratorImpl.java
(original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/SimpleOrchestratorImpl.java
Wed Jan 22 21:23:00 2014
@@ -21,6 +21,7 @@
 package org.apache.airavata.orchestrator.core;
 
 import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
+import org.apache.airavata.orchestrator.core.job.JobSubmitter;
 import org.apache.airavata.registry.api.JobRequest;
 
 public class SimpleOrchestratorImpl extends AbstractOrchestrator{
@@ -28,7 +29,7 @@ public class SimpleOrchestratorImpl exte
 	@Override
 	public boolean initialize() throws OrchestratorException {
 		super.initialize();
-		return false;
+		return true;
 	}
 
 	@Override

Added: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/ExperimentConfigurationData.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/ExperimentConfigurationData.java?rev=1560514&view=auto
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/ExperimentConfigurationData.java
(added)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/ExperimentConfigurationData.java
Wed Jan 22 21:23:00 2014
@@ -0,0 +1,49 @@
+package org.apache.airavata.orchestrator.core.model;
+
+import java.util.Map;
+
+public class ExperimentConfigurationData {
+	 private String experimentID;
+	 private String applicationName;
+	 private String jobRequest;
+	 private ResourceScheduling resourceScheduling;
+	 private Map<String,Object> inputParameters;
+	 private Map<String,Object> outputParameters;
+	public String getExperimentID() {
+		return experimentID;
+	}
+	public void setExperimentID(String experimentID) {
+		this.experimentID = experimentID;
+	}
+	public String getApplicationName() {
+		return applicationName;
+	}
+	public void setApplicationName(String applicationName) {
+		this.applicationName = applicationName;
+	}
+	public String getJobRequest() {
+		return jobRequest;
+	}
+	public void setJobRequest(String jobRequest) {
+		this.jobRequest = jobRequest;
+	}
+	public ResourceScheduling getResourceScheduling() {
+		return resourceScheduling;
+	}
+	public void setResourceScheduling(ResourceScheduling resourceScheduling) {
+		this.resourceScheduling = resourceScheduling;
+	}
+	public Map<String, Object> getInputParameters() {
+		return inputParameters;
+	}
+	public void setInputParameters(Map<String, Object> inputParameters) {
+		this.inputParameters = inputParameters;
+	}
+	public Map<String, Object> getOutputParameters() {
+		return outputParameters;
+	}
+	public void setOutputParameters(Map<String, Object> outputParameters) {
+		this.outputParameters = outputParameters;
+	}
+	 
+}

Copied: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/ExperimentRequest.java
(from r1560503, airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/ExperimentRequest.java)
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/ExperimentRequest.java?p2=airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/ExperimentRequest.java&p1=airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/ExperimentRequest.java&r1=1560503&r2=1560514&rev=1560514&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/ExperimentRequest.java
(original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/ExperimentRequest.java
Wed Jan 22 21:23:00 2014
@@ -18,7 +18,7 @@
  * under the License.
  *
 */
-package org.apache.airavata.orchestrator.core;
+package org.apache.airavata.orchestrator.core.model;
 
 
 /**
@@ -34,11 +34,7 @@ public class ExperimentRequest {
     
     private String systemExperimentID;
     
-    private String applicationName;
-    
-    private String jobRequest;
-
-    public String getUserExperimentID() {
+       public String getUserExperimentID() {
         return userExperimentID;
     }
 
@@ -62,19 +58,4 @@ public class ExperimentRequest {
 		this.systemExperimentID = systemExperimentID;
 	}
 
-	public String getApplicationName() {
-		return applicationName;
-	}
-
-	public void setApplicationName(String applicationName) {
-		this.applicationName = applicationName;
-	}
-
-	public String getJobRequest() {
-		return jobRequest;
-	}
-
-	public void setJobRequest(String jobRequest) {
-		this.jobRequest = jobRequest;
-	}
 }

Added: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/ResourceScheduling.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/ResourceScheduling.java?rev=1560514&view=auto
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/ResourceScheduling.java
(added)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/ResourceScheduling.java
Wed Jan 22 21:23:00 2014
@@ -0,0 +1,56 @@
+package org.apache.airavata.orchestrator.core.model;
+
+public class ResourceScheduling {
+	
+	private boolean autoSchedule;
+	private boolean overrideManualScheduledParams;
+	private String hostName;
+	private int cpuCount;
+	private int nodeCount;
+	private String queueName;
+	private int maxWallTime;
+	
+	public boolean isAutoSchedule() {
+		return autoSchedule;
+	}
+	public void setAutoSchedule(boolean autoSchedule) {
+		this.autoSchedule = autoSchedule;
+	}
+	public boolean isOverrideManualScheduledParams() {
+		return overrideManualScheduledParams;
+	}
+	public void setOverrideManualScheduledParams(boolean overrideManualScheduledParams) {
+		this.overrideManualScheduledParams = overrideManualScheduledParams;
+	}
+	public String getHostName() {
+		return hostName;
+	}
+	public void setHostName(String hostName) {
+		this.hostName = hostName;
+	}
+	public int getCpuCount() {
+		return cpuCount;
+	}
+	public void setCpuCount(int cpuCount) {
+		this.cpuCount = cpuCount;
+	}
+	public int getNodeCount() {
+		return nodeCount;
+	}
+	public void setNodeCount(int nodeCount) {
+		this.nodeCount = nodeCount;
+	}
+	public String getQueueName() {
+		return queueName;
+	}
+	public void setQueueName(String queueName) {
+		this.queueName = queueName;
+	}
+	public int getMaxWallTime() {
+		return maxWallTime;
+	}
+	public void setMaxWallTime(int maxWallTime) {
+		this.maxWallTime = maxWallTime;
+	}
+	
+}

Modified: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorConstants.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorConstants.java?rev=1560514&r1=1560513&r2=1560514&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorConstants.java
(original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorConstants.java
Wed Jan 22 21:23:00 2014
@@ -27,6 +27,7 @@ package org.apache.airavata.orchestrator
 public class OrchestratorConstants {
     private static final String SUBMITTER_PROPERTY = "job.submitter";
     public static final String ORCHESTRATOR_PROPERTIES = "orchestrator.properties";
+    public static final String AIRAVATA_PROPERTIES = "airavata-server.properties";
     public static final int hotUpdateInterval=1000;
     public static final String JOB_SUBMITTER = "job.submitter";
     public static final String SUBMIT_INTERVAL = "submitter.interval";

Modified: airavata/trunk/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/SimpleOrchestratorTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/SimpleOrchestratorTest.java?rev=1560514&r1=1560513&r2=1560514&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/SimpleOrchestratorTest.java
(original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/SimpleOrchestratorTest.java
Wed Jan 22 21:23:00 2014
@@ -32,6 +32,7 @@ import org.apache.airavata.commons.gfac.
 import org.apache.airavata.commons.gfac.type.ApplicationDescription;
 import org.apache.airavata.commons.gfac.type.HostDescription;
 import org.apache.airavata.commons.gfac.type.ServiceDescription;
+import org.apache.airavata.orchestrator.core.model.ExperimentRequest;
 import org.apache.airavata.registry.api.JobRequest;
 import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.apache.airavata.schemas.gfac.DataType;

Modified: airavata/trunk/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/TestWithStoredDescriptors.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/TestWithStoredDescriptors.java?rev=1560514&r1=1560513&r2=1560514&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/TestWithStoredDescriptors.java
(original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/TestWithStoredDescriptors.java
Wed Jan 22 21:23:00 2014
@@ -21,6 +21,7 @@
 package org.apache.airavata.orchestrator.core;
 
 import junit.framework.Assert;
+
 import org.apache.airavata.client.AiravataAPIFactory;
 import org.apache.airavata.client.api.AiravataAPI;
 import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
@@ -31,6 +32,7 @@ import org.apache.airavata.commons.gfac.
 import org.apache.airavata.commons.gfac.type.ApplicationDescription;
 import org.apache.airavata.commons.gfac.type.HostDescription;
 import org.apache.airavata.commons.gfac.type.ServiceDescription;
+import org.apache.airavata.orchestrator.core.model.ExperimentRequest;
 import org.apache.airavata.registry.api.JobRequest;
 import org.apache.airavata.schemas.gfac.*;
 import org.slf4j.Logger;



Mime
View raw message