From 6d578e61b3d024514e840f71397941c5bb694504 Mon Sep 17 00:00:00 2001 From: Andreas Egger Date: Thu, 13 Jun 2013 13:16:20 +0200 Subject: [PATCH] Organize logfiles output - less error prone --- build.xml | 25 ++++++++++----------- src/at/ac/tuwien/lsdc/SchedSimulator.java | 8 +++---- src/at/ac/tuwien/lsdc/sched/SchedulerB.java | 2 +- src/at/ac/tuwien/lsdc/sched/SchedulerC.java | 2 +- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/build.xml b/build.xml index 8b84489..4b37e97 100644 --- a/build.xml +++ b/build.xml @@ -17,7 +17,6 @@ - @@ -82,11 +81,11 @@ - + - + @@ -95,11 +94,11 @@ - + - + @@ -108,11 +107,11 @@ - + - + @@ -121,7 +120,7 @@ - + @@ -134,7 +133,7 @@ - + @@ -147,7 +146,7 @@ - + @@ -160,7 +159,7 @@ - + @@ -173,7 +172,7 @@ - + @@ -186,7 +185,7 @@ - + diff --git a/src/at/ac/tuwien/lsdc/SchedSimulator.java b/src/at/ac/tuwien/lsdc/SchedSimulator.java index 2e92150..2ed2bb3 100644 --- a/src/at/ac/tuwien/lsdc/SchedSimulator.java +++ b/src/at/ac/tuwien/lsdc/SchedSimulator.java @@ -24,7 +24,7 @@ import at.ac.tuwien.lsdc.util.CSVParser; */ public class SchedSimulator { - private static final String USAGE = "SchedSimulator needs exactly 7 parameters: scenario, scheduler, numPMS, numCloudPartners, inputFile, generalLogPath, schedulerLogPath"; + private static final String USAGE = "SchedSimulator needs exactly 7 parameters: scheduler, scenario, numPMS, numCloudPartners, inputFile, generalLogPath, schedulerLogPath"; private static final Logger log = LoggerFactory .getLogger(SchedSimulator.class); @@ -73,8 +73,8 @@ public class SchedSimulator { /** * Commandline arguments parsed (mandatory): - * - type of scenario * - type of scheduler + * - type of scenario * - number of available PMs * - number of cloud partners * - scenario input file with applications @@ -83,8 +83,8 @@ public class SchedSimulator { * @param args the command line arguments to parse */ private static void parseCommandLineArgs(String[] args) { - String scenarioStr = args[0]; - String schedulerTypeStr = args[1]; + String schedulerTypeStr = args[0]; + String scenarioStr = args[1]; String numPMsStr = args[2]; String numCloudPartnersStr = args[3]; String inputFileStr = args[4]; diff --git a/src/at/ac/tuwien/lsdc/sched/SchedulerB.java b/src/at/ac/tuwien/lsdc/sched/SchedulerB.java index e3384cc..b859824 100644 --- a/src/at/ac/tuwien/lsdc/sched/SchedulerB.java +++ b/src/at/ac/tuwien/lsdc/sched/SchedulerB.java @@ -108,7 +108,7 @@ public class SchedulerB extends AbstractSchedulerWithMigration { break; } } - if (vm == null) { + if (!deployed) { try { vm = manager.startPhysicalMachine().startVirtualMachine(evt.getApp().getSize(), evt.getApp().getRam(), evt.getApp().getCpu(), vmType); diff --git a/src/at/ac/tuwien/lsdc/sched/SchedulerC.java b/src/at/ac/tuwien/lsdc/sched/SchedulerC.java index 1539854..1c594dd 100644 --- a/src/at/ac/tuwien/lsdc/sched/SchedulerC.java +++ b/src/at/ac/tuwien/lsdc/sched/SchedulerC.java @@ -65,7 +65,7 @@ public class SchedulerC extends AbstractSchedulerWithMigration { break; } } - if (vm == null) { + if (!deployed) { try { vm = manager.startPhysicalMachine().startVirtualMachine(vmType); deployed = deployApp(vm, evt.getApp()); -- 2.43.0