From 8b211d534b949d75e67b75df26142e4f8fb790bf Mon Sep 17 00:00:00 2001 From: Andreas Egger Date: Thu, 13 Jun 2013 15:22:32 +0200 Subject: [PATCH] delayed apps test --- build.xml | 4 ++-- src/at/ac/tuwien/lsdc/sched/SchedulerA.java | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/build.xml b/build.xml index 4b37e97..49475bb 100644 --- a/build.xml +++ b/build.xml @@ -5,8 +5,8 @@ - - + + diff --git a/src/at/ac/tuwien/lsdc/sched/SchedulerA.java b/src/at/ac/tuwien/lsdc/sched/SchedulerA.java index f7355c6..f65e699 100644 --- a/src/at/ac/tuwien/lsdc/sched/SchedulerA.java +++ b/src/at/ac/tuwien/lsdc/sched/SchedulerA.java @@ -57,9 +57,10 @@ public class SchedulerA extends AbstractScheduler { @Override protected void handleStartEvents(LinkedList events) { // sorting applications by amount of resources (descending) - List sortedApps = sortApps(events); - - for (Application app : sortedApps) { +// List sortedApps = sortApps(events); + List apps = getApplications(events); + + for (Application app : apps) { boolean appDeployed = false; if (manager.getPMs().size() == 0) { @@ -136,6 +137,14 @@ public class SchedulerA extends AbstractScheduler { Collections.reverse(sortedApps); return sortedApps; } + + public List getApplications(LinkedList events) { + List apps = new LinkedList(); + for(SchedulerEvent evt: events) { + apps.add(evt.getApp()); + } + return apps; + } @Override protected String getSchedulerType() { -- 2.43.0