summaryrefslogtreecommitdiff
path: root/opendc-compute
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-compute')
-rw-r--r--opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/scheduler/SmartScheduler.kt7
1 files changed, 7 insertions, 0 deletions
diff --git a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/scheduler/SmartScheduler.kt b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/scheduler/SmartScheduler.kt
index 42b652a7..0d1cc408 100644
--- a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/scheduler/SmartScheduler.kt
+++ b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/scheduler/SmartScheduler.kt
@@ -69,6 +69,8 @@ public class SmartScheduler : ComputeScheduler {
override fun select(iter: MutableIterator<SchedulingRequest>): SchedulingResult {
client?.checkForInsights()
+ var unluckyHost = listOf("")
+
if (numHosts == 0) {
return SchedulingResult(SchedulingResultType.FAILURE)
}
@@ -94,6 +96,11 @@ public class SmartScheduler : ComputeScheduler {
for (chosenListIndex in minAvailableHost until hostsQueue.size) {
chosenList = hostsQueue[chosenListIndex]
for (host in chosenList) {
+ if(unluckyHost.isNotEmpty()){
+ if(host.host.getName() in unluckyHost){
+ continue
+ }
+ }
// Here be filtering, but for now we remove it completely.
iter.remove()
chosenHost = host