Skip to content
Snippets Groups Projects
Commit e7f239d4 authored by Lorenz Boguhn's avatar Lorenz Boguhn
Browse files

Restructuring

parent becfb5e9
No related branches found
No related tags found
4 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus,!78Resolve "Implement Quarkus/Kotlin protype"
Showing
with 34 additions and 33 deletions
package theodolite
import javax.ws.rs.GET
import javax.ws.rs.Path
import javax.ws.rs.Produces
import javax.ws.rs.core.MediaType
@Path("/hello-resteasy")
class GreetingResource {
@GET
@Produces(MediaType.TEXT_PLAIN)
fun hello() = "Hello RESTEasy"
}
\ No newline at end of file
......@@ -2,6 +2,7 @@ package theodolite
import io.quarkus.runtime.annotations.QuarkusMain
import mu.KotlinLogging
import theodolite.execution.DeploymentManager
private val logger = KotlinLogging.logger {}
......
package theodolite
package theodolite.execution
class Benchmark {
fun start() {}
fun stop() {}
fun startWorkloadGenerator(wg: String, dimValue: Int, ucId: String) { }
fun startWorkloadGenerator(wg: String, dimValue: Int, ucId: String) {}
}
package theodolite
package theodolite.execution
class BenchmarkExecutor(benchmark: Benchmark) {
val benchmark: Benchmark = benchmark
fun waitExecution(executionMinutes: Int) {
val milliToMinutes = 60000
System.out.println("Wait while executing")
for (i in 1.rangeTo(executionMinutes)) {
Thread.sleep((milliToMinutes * i).toLong())
System.out.println("Executed: $i minutes")
val milliToMinutes = 60000
System.out.println("Wait while executing")
for (i in 1.rangeTo(executionMinutes)) {
Thread.sleep((milliToMinutes * i).toLong())
System.out.println("Executed: $i minutes")
}
System.out.println("Execution finished")
}
System.out.println("Execution finished")
}
fun runExperiment() {}
}
package theodolite
package theodolite.execution
import io.fabric8.kubernetes.api.model.ConfigMap
import io.fabric8.kubernetes.client.NamespacedKubernetesClient
......
package theodolite
package theodolite.execution
import io.fabric8.kubernetes.api.model.Container
import io.fabric8.kubernetes.api.model.EnvVar
......
package theodolite
package theodolite.execution
import io.fabric8.kubernetes.api.model.Service
import io.fabric8.kubernetes.client.NamespacedKubernetesClient
......
package theodolite
package theodolite.execution
import io.fabric8.kubernetes.api.model.ConfigMap
import io.fabric8.kubernetes.api.model.Service
......
package theodolite
package theodolite.k8s
import org.apache.kafka.clients.admin.AdminClient
import org.apache.kafka.clients.admin.AdminClientConfig
......@@ -12,7 +12,7 @@ class TopicManager(boostrapIp: String) {
init {
try {
kafkaAdmin = AdminClient.create(props)
} catch (e : Exception) {
} catch (e: Exception) {
System.out.println(e.toString())
}
}
......@@ -45,7 +45,7 @@ class TopicManager(boostrapIp: String) {
try {
result.all().get()
} catch (ex:Exception) {
} catch (ex: Exception) {
System.out.println(ex.toString())
}
System.out.println("Topics deleted")
......
package theodolite
package theodolite.k8s
import org.apache.zookeeper.KeeperException
import org.apache.zookeeper.WatchedEvent
......@@ -15,7 +15,7 @@ class WorkloadGeneratorStateCleaner(ip: String) {
try {
val watcher: Watcher = ZookeperWatcher() // defined below
zookeeperClient = ZooKeeper(ip, sessionTimeout, watcher)
} catch (e:Exception) {
} catch (e: Exception) {
System.out.println(e.toString())
}
}
......@@ -33,12 +33,14 @@ class WorkloadGeneratorStateCleaner(ip: String) {
try {
val clients = zookeeperClient.getChildren(path, true)
if (clients.isEmpty()){
if (clients.isEmpty()) {
break;
}
} catch (ex: Exception) {
when (ex) {
is KeeperException -> { deleted = true }
is KeeperException -> {
deleted = true
}
is InterruptedException -> {
System.out.println(ex.toString())
}
......
package theodolite
import io.quarkus.test.junit.NativeImageTest
@NativeImageTest
class NativeGreetingResourceIT : GreetingResourceTest()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment