Commit 9d80f55e authored by zs673's avatar zs673

ona simple mapping updated

parent 16f0752a
......@@ -242,17 +242,17 @@ public final class UoYOptimisationEngine {
}
String res = writer.toString();
if (!res.contains("grant")) {
uoyProducer.send(new ProducerRecord<String, String>("Status", "timestamp: " + Instant.now(),
"workload " + sessionID + " rejected"));
System.out.println("workload " + sessionID + " rejected. message: " + res);
continue;
} else {
uoyProducer.send(new ProducerRecord<String, String>("Status", "timestamp: " + Instant.now(),
"workload " + sessionID + " granted"));
System.out.println("workload " + sessionID + " granted");
}
// if (!res.contains("grant")) {
//
// uoyProducer.send(new ProducerRecord<String, String>("Status", "timestamp: " + Instant.now(),
// "workload " + sessionID + " rejected"));
// System.out.println("workload " + sessionID + " rejected. message: " + res);
// continue;
// } else {
// uoyProducer.send(new ProducerRecord<String, String>("Status", "timestamp: " + Instant.now(),
// "workload " + sessionID + " granted"));
// System.out.println("workload " + sessionID + " granted");
// }
if (prevConfig != null) {
......@@ -520,7 +520,7 @@ public final class UoYOptimisationEngine {
if (newAllocation.contains("Small")) {
newAllocation = allocT.getValue(0);
} else if (newAllocation.contains("Medium")) {
newAllocation = allocT.getValue(allocT.numValues() - 1);
newAllocation = allocT.getValue(0);
} else {
newAllocation = allocT.getValue(0);
}
......@@ -895,7 +895,6 @@ public final class UoYOptimisationEngine {
System.out.println("wait for atb producer input.");
Thread.sleep(3000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
runUoY(maxTopicUpdates, bootstrapServersConfig, bc, urgency, iterations, mode, rng);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment