airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dimuthu...@apache.org
Subject [airavata] branch staging updated: Adding missing Host Scheduler
Date Sun, 09 Dec 2018 18:16:56 GMT
This is an automated email from the ASF dual-hosted git repository.

dimuthuupe pushed a commit to branch staging
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/staging by this push:
     new ec22e48  Adding missing Host Scheduler
ec22e48 is described below

commit ec22e480c42d015a605b4b89ad5557fd59f30940
Author: Dimuthu Wannipurage <dimuthu.wannipurage@datasprouts.com>
AuthorDate: Sun Dec 9 23:46:44 2018 +0530

    Adding missing Host Scheduler
---
 .../templates/airavata-server.properties.j2        |  2 +-
 .../gfac/templates/airavata-server.properties.j2   |  2 +-
 .../templates/airavata-server.properties.j2        |  2 +-
 .../src/main/resources/airavata-server.properties  |  2 +-
 .../core/schedule/DefaultHostScheduler.java        | 36 ++++++++++++++++++++++
 5 files changed, 40 insertions(+), 4 deletions(-)

diff --git a/dev-tools/ansible/roles/api-orch/templates/airavata-server.properties.j2 b/dev-tools/ansible/roles/api-orch/templates/airavata-server.properties.j2
index 75a9e24..86dede1 100644
--- a/dev-tools/ansible/roles/api-orch/templates/airavata-server.properties.j2
+++ b/dev-tools/ansible/roles/api-orch/templates/airavata-server.properties.j2
@@ -155,7 +155,7 @@ threadpool.size=10
 start.submitter=true
 embedded.mode=true
 enable.validation=true
-host.scheduler=org.apache.airavata.gfac.impl.DefaultHostScheduler
+host.scheduler=org.apache.airavata.orchestrator.core.schedule.DefaultHostScheduler
 
 ###########################################################################
 #  Registry Server Configurations
diff --git a/dev-tools/ansible/roles/gfac/templates/airavata-server.properties.j2 b/dev-tools/ansible/roles/gfac/templates/airavata-server.properties.j2
index 5fe9bee..26f920a 100644
--- a/dev-tools/ansible/roles/gfac/templates/airavata-server.properties.j2
+++ b/dev-tools/ansible/roles/gfac/templates/airavata-server.properties.j2
@@ -166,7 +166,7 @@ gfac.server.name={{ gfac_name }}
 gfac.server.host={{ gfac_host }}
 gfac.server.port={{ gfac_port }}
 gfac.thread.pool.size=50
-host.scheduler=org.apache.airavata.gfac.impl.DefaultHostScheduler
+host.scheduler=org.apache.airavata.orchestrator.core.schedule.DefaultHostScheduler
 
 
 
diff --git a/dev-tools/ansible/roles/registry/templates/airavata-server.properties.j2 b/dev-tools/ansible/roles/registry/templates/airavata-server.properties.j2
index 3ad2aa0..1067f39 100644
--- a/dev-tools/ansible/roles/registry/templates/airavata-server.properties.j2
+++ b/dev-tools/ansible/roles/registry/templates/airavata-server.properties.j2
@@ -166,7 +166,7 @@ gfac.server.name={{ gfac_name }}
 gfac.server.host={{ gfac_host }}
 gfac.server.port={{ gfac_port }}
 gfac.thread.pool.size=50
-host.scheduler=org.apache.airavata.gfac.impl.DefaultHostScheduler
+host.scheduler=org.apache.airavata.orchestrator.core.schedule.DefaultHostScheduler
 
 
 
diff --git a/modules/configuration/server/src/main/resources/airavata-server.properties b/modules/configuration/server/src/main/resources/airavata-server.properties
index 9db7893..e5b6ba8 100644
--- a/modules/configuration/server/src/main/resources/airavata-server.properties
+++ b/modules/configuration/server/src/main/resources/airavata-server.properties
@@ -166,7 +166,7 @@ gfac.server.name=gfac-node0
 gfac.server.host=localhost
 gfac.server.port=8950
 gfac.thread.pool.size=50
-host.scheduler=org.apache.airavata.gfac.impl.DefaultHostScheduler
+host.scheduler=org.apache.airavata.orchestrator.core.schedule.DefaultHostScheduler
 
 # ssh session access timeout in minutes default is 30 minutes
 #ssh.session.cache.access.timeout=30
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/schedule/DefaultHostScheduler.java
b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/schedule/DefaultHostScheduler.java
new file mode 100644
index 0000000..ff4e840
--- /dev/null
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/schedule/DefaultHostScheduler.java
@@ -0,0 +1,36 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.airavata.orchestrator.core.schedule;
+
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+
+import java.util.List;
+
+public class DefaultHostScheduler implements HostScheduler {
+    @Override
+    public ComputeResourceDescription schedule(List<ComputeResourceDescription> registeredHosts)
{
+        if (registeredHosts == null || registeredHosts.isEmpty()) {
+            return null;
+        } else {
+            return registeredHosts.get(0); // return first schedulear in the list.
+        }
+    }
+}


Mime
View raw message