From 647f5b710bf1e74f259d2e433eea8895c6b10d86 Mon Sep 17 00:00:00 2001 From: lorenz <stu203404@mail.uni-kiel.de> Date: Mon, 11 Jan 2021 17:20:07 +0100 Subject: [PATCH] Remove zookeeper from BenchmarkExecutor + Add Benchmark --- .../src/main/kotlin/theodolite/Benchmark.kt | 13 ++++++++++++ .../kotlin/theodolite/BenchmarkExecutor.kt | 21 +------------------ .../src/main/kotlin/theodolite/Main.kt | 8 +------ 3 files changed, 15 insertions(+), 27 deletions(-) create mode 100644 theodolite-quarkus/src/main/kotlin/theodolite/Benchmark.kt diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/Benchmark.kt b/theodolite-quarkus/src/main/kotlin/theodolite/Benchmark.kt new file mode 100644 index 000000000..ddb5bc913 --- /dev/null +++ b/theodolite-quarkus/src/main/kotlin/theodolite/Benchmark.kt @@ -0,0 +1,13 @@ +package theodolite + +class Benchmark { + + + fun start(){ + + } + + fun stop(){ + + } +} \ No newline at end of file diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/BenchmarkExecutor.kt b/theodolite-quarkus/src/main/kotlin/theodolite/BenchmarkExecutor.kt index cf31b75ed..afa4acfc6 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/BenchmarkExecutor.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/BenchmarkExecutor.kt @@ -4,11 +4,6 @@ import org.apache.kafka.clients.admin.AdminClient import org.apache.kafka.clients.admin.AdminClientConfig import org.apache.kafka.clients.admin.ListTopicsResult import org.apache.kafka.clients.admin.NewTopic -import org.apache.zookeeper.Watcher -import org.apache.zookeeper.ZooKeeper -import org.apache.zookeeper.WatchedEvent - - class RunUc (){ @@ -60,23 +55,9 @@ class RunUc (){ } - fun resetZookeeper(){ - val watcher :Watcher = startWatcher() - - val zookeeperclient = ZooKeeper(ip,60, watcher) - zookeeperclient.delete("/workload-generation", -1) - System.out.println("Deletion executed") - } - - private fun startWatcher(): Watcher { - return Watcher { event -> - System.out.println(event.toString()) - System.out.println(event.state.toString()) - } - } - fun start_workload_generator(wg: String, dim_value:Integer, uc_id: String){ } } + diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/Main.kt b/theodolite-quarkus/src/main/kotlin/theodolite/Main.kt index e83c7bdff..a7846edad 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/Main.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/Main.kt @@ -8,13 +8,7 @@ object Main { fun main(args: Array<String>) { println("Running main method") - val run = RunUc() - - val testtopic = mapOf<String,Int>("test" to 1) - - run.createTopics(testtopic, 1.toShort()) - run.deleteTopics(listOf("test")) //Quarkus.run() - run.resetZookeeper() + } } -- GitLab