From ac8029e55f9dab0838d14444d7885b8075464828 Mon Sep 17 00:00:00 2001 From: Daniel Seybold Date: Tue, 26 Nov 2019 14:28:20 +0100 Subject: [PATCH] added mising files and implemented fetchTSBS --- .../dbms/evaluator/model/PerformanceTSBS.java | 190 ++++++++++++ .../dbms/evaluator/model/TSBSDataConfig.java | 269 ++++++++++++++++ .../dbms/evaluator/model/TSBSLoadConfig.java | 148 +++++++++ .../evaluator/model/TSBSLoadWorkload.java | 191 ++++++++++++ .../dbms/evaluator/model/TSBSQueryConfig.java | 293 ++++++++++++++++++ .../evaluator/model/TSBSQueryExecution.java | 124 ++++++++ .../evaluator/model/TSDBMSDBMSProperties.java | 114 +++++++ .../scenario/PerformanceTSBSScenario.java | 6 +- .../omi/evaluation/task/FetchTSBSResult.java | 72 +++++ 9 files changed, 1404 insertions(+), 3 deletions(-) create mode 100644 src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/PerformanceTSBS.java create mode 100644 src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSBSDataConfig.java create mode 100644 src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSBSLoadConfig.java create mode 100644 src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSBSLoadWorkload.java create mode 100644 src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSBSQueryConfig.java create mode 100644 src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSBSQueryExecution.java create mode 100644 src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSDBMSDBMSProperties.java create mode 100644 src/main/java/de/uulm/omi/evaluation/task/FetchTSBSResult.java diff --git a/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/PerformanceTSBS.java b/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/PerformanceTSBS.java new file mode 100644 index 0000000..8e09297 --- /dev/null +++ b/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/PerformanceTSBS.java @@ -0,0 +1,190 @@ +/* + * Mowgli Evaluation Orchestrator + * Evaluate the Performance/Scalability/Elasticity/Availability of distributed DBMS in the Cloud + * + * OpenAPI spec version: 0.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.dbms.evaluator.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import de.uulm.omi.cloudiator.dbms.evaluator.model.DatabaseSingle; +import de.uulm.omi.cloudiator.dbms.evaluator.model.EvaluationNetwork; +import de.uulm.omi.cloudiator.dbms.evaluator.model.TSBSLoadWorkload; +import de.uulm.omi.cloudiator.dbms.evaluator.model.WorkloadInstances; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.constraints.*; + +/** + * PerformanceTSBS + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2019-11-26T12:37:55.291+01:00") +public class PerformanceTSBS { + @JsonProperty("workloadNetwork") + private EvaluationNetwork workloadNetwork = null; + + @JsonProperty("dbmsNetwork") + private EvaluationNetwork dbmsNetwork = null; + + @JsonProperty("dbmsSingle") + private DatabaseSingle dbmsSingle = null; + + @JsonProperty("workloadLoad") + private TSBSLoadWorkload workloadLoad = null; + + @JsonProperty("workloadInstances") + private WorkloadInstances workloadInstances = null; + + public PerformanceTSBS workloadNetwork(EvaluationNetwork workloadNetwork) { + this.workloadNetwork = workloadNetwork; + return this; + } + + /** + * Get workloadNetwork + * @return workloadNetwork + **/ + @JsonProperty("workloadNetwork") + @ApiModelProperty(value = "") + public EvaluationNetwork getWorkloadNetwork() { + return workloadNetwork; + } + + public void setWorkloadNetwork(EvaluationNetwork workloadNetwork) { + this.workloadNetwork = workloadNetwork; + } + + public PerformanceTSBS dbmsNetwork(EvaluationNetwork dbmsNetwork) { + this.dbmsNetwork = dbmsNetwork; + return this; + } + + /** + * Get dbmsNetwork + * @return dbmsNetwork + **/ + @JsonProperty("dbmsNetwork") + @ApiModelProperty(value = "") + public EvaluationNetwork getDbmsNetwork() { + return dbmsNetwork; + } + + public void setDbmsNetwork(EvaluationNetwork dbmsNetwork) { + this.dbmsNetwork = dbmsNetwork; + } + + public PerformanceTSBS dbmsSingle(DatabaseSingle dbmsSingle) { + this.dbmsSingle = dbmsSingle; + return this; + } + + /** + * Get dbmsSingle + * @return dbmsSingle + **/ + @JsonProperty("dbmsSingle") + @ApiModelProperty(value = "") + public DatabaseSingle getDbmsSingle() { + return dbmsSingle; + } + + public void setDbmsSingle(DatabaseSingle dbmsSingle) { + this.dbmsSingle = dbmsSingle; + } + + public PerformanceTSBS workloadLoad(TSBSLoadWorkload workloadLoad) { + this.workloadLoad = workloadLoad; + return this; + } + + /** + * Get workloadLoad + * @return workloadLoad + **/ + @JsonProperty("workloadLoad") + @ApiModelProperty(value = "") + public TSBSLoadWorkload getWorkloadLoad() { + return workloadLoad; + } + + public void setWorkloadLoad(TSBSLoadWorkload workloadLoad) { + this.workloadLoad = workloadLoad; + } + + public PerformanceTSBS workloadInstances(WorkloadInstances workloadInstances) { + this.workloadInstances = workloadInstances; + return this; + } + + /** + * Get workloadInstances + * @return workloadInstances + **/ + @JsonProperty("workloadInstances") + @ApiModelProperty(value = "") + public WorkloadInstances getWorkloadInstances() { + return workloadInstances; + } + + public void setWorkloadInstances(WorkloadInstances workloadInstances) { + this.workloadInstances = workloadInstances; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceTSBS performanceTSBS = (PerformanceTSBS) o; + return Objects.equals(this.workloadNetwork, performanceTSBS.workloadNetwork) && + Objects.equals(this.dbmsNetwork, performanceTSBS.dbmsNetwork) && + Objects.equals(this.dbmsSingle, performanceTSBS.dbmsSingle) && + Objects.equals(this.workloadLoad, performanceTSBS.workloadLoad) && + Objects.equals(this.workloadInstances, performanceTSBS.workloadInstances); + } + + @Override + public int hashCode() { + return Objects.hash(workloadNetwork, dbmsNetwork, dbmsSingle, workloadLoad, workloadInstances); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceTSBS {\n"); + + sb.append(" workloadNetwork: ").append(toIndentedString(workloadNetwork)).append("\n"); + sb.append(" dbmsNetwork: ").append(toIndentedString(dbmsNetwork)).append("\n"); + sb.append(" dbmsSingle: ").append(toIndentedString(dbmsSingle)).append("\n"); + sb.append(" workloadLoad: ").append(toIndentedString(workloadLoad)).append("\n"); + sb.append(" workloadInstances: ").append(toIndentedString(workloadInstances)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSBSDataConfig.java b/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSBSDataConfig.java new file mode 100644 index 0000000..9282dc9 --- /dev/null +++ b/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSBSDataConfig.java @@ -0,0 +1,269 @@ +/* + * Mowgli Evaluation Orchestrator + * Evaluate the Performance/Scalability/Elasticity/Availability of distributed DBMS in the Cloud + * + * OpenAPI spec version: 0.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.dbms.evaluator.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import javax.validation.constraints.*; + +/** + * TSBSDataConfig + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2019-11-26T12:37:55.291+01:00") +public class TSBSDataConfig { + @JsonProperty("usecase") + private String usecase = null; + + @JsonProperty("seed") + private BigDecimal seed = null; + + @JsonProperty("scale") + private BigDecimal scale = null; + + @JsonProperty("startTime") + private String startTime = null; + + @JsonProperty("endTime") + private String endTime = null; + + @JsonProperty("logInterval") + private String logInterval = null; + + /** + * specifies the data format for the selected DBMS + */ + public enum FormatEnum { + INFLUX("influx"), + + TIMESCALEDB("timescaledb"), + + MONGODB("mongodb"); + + private String value; + + FormatEnum(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FormatEnum fromValue(String text) { + for (FormatEnum b : FormatEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("format") + private FormatEnum format = null; + + public TSBSDataConfig usecase(String usecase) { + this.usecase = usecase; + return this; + } + + /** + * TODO + * @return usecase + **/ + @JsonProperty("usecase") + @ApiModelProperty(example = "cpu-only", value = "TODO") + public String getUsecase() { + return usecase; + } + + public void setUsecase(String usecase) { + this.usecase = usecase; + } + + public TSBSDataConfig seed(BigDecimal seed) { + this.seed = seed; + return this; + } + + /** + * By supplying the same seed to the generation programs, each database is loaded with identical data and queried using identical queries. + * @return seed + **/ + @JsonProperty("seed") + @ApiModelProperty(example = "123.0", value = "By supplying the same seed to the generation programs, each database is loaded with identical data and queried using identical queries.") + public BigDecimal getSeed() { + return seed; + } + + public void setSeed(BigDecimal seed) { + this.seed = seed; + } + + public TSBSDataConfig scale(BigDecimal scale) { + this.scale = scale; + return this; + } + + /** + * TODO + * @return scale + **/ + @JsonProperty("scale") + @ApiModelProperty(example = "1000.0", value = "TODO") + public BigDecimal getScale() { + return scale; + } + + public void setScale(BigDecimal scale) { + this.scale = scale; + } + + public TSBSDataConfig startTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + * starting timestamp for generating the data + * @return startTime + **/ + @JsonProperty("startTime") + @ApiModelProperty(example = "2016-01-01T00:00:00Z", value = "starting timestamp for generating the data") + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public TSBSDataConfig endTime(String endTime) { + this.endTime = endTime; + return this; + } + + /** + * ending timestamp for generating the data + * @return endTime + **/ + @JsonProperty("endTime") + @ApiModelProperty(example = "2016-01-04T00:00:00Z", value = "ending timestamp for generating the data") + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public TSBSDataConfig logInterval(String logInterval) { + this.logInterval = logInterval; + return this; + } + + /** + * TODO + * @return logInterval + **/ + @JsonProperty("logInterval") + @ApiModelProperty(example = "10s", value = "TODO") + public String getLogInterval() { + return logInterval; + } + + public void setLogInterval(String logInterval) { + this.logInterval = logInterval; + } + + public TSBSDataConfig format(FormatEnum format) { + this.format = format; + return this; + } + + /** + * specifies the data format for the selected DBMS + * @return format + **/ + @JsonProperty("format") + @ApiModelProperty(example = "influx", value = "specifies the data format for the selected DBMS") + public FormatEnum getFormat() { + return format; + } + + public void setFormat(FormatEnum format) { + this.format = format; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TSBSDataConfig tsBSDataConfig = (TSBSDataConfig) o; + return Objects.equals(this.usecase, tsBSDataConfig.usecase) && + Objects.equals(this.seed, tsBSDataConfig.seed) && + Objects.equals(this.scale, tsBSDataConfig.scale) && + Objects.equals(this.startTime, tsBSDataConfig.startTime) && + Objects.equals(this.endTime, tsBSDataConfig.endTime) && + Objects.equals(this.logInterval, tsBSDataConfig.logInterval) && + Objects.equals(this.format, tsBSDataConfig.format); + } + + @Override + public int hashCode() { + return Objects.hash(usecase, seed, scale, startTime, endTime, logInterval, format); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TSBSDataConfig {\n"); + + sb.append(" usecase: ").append(toIndentedString(usecase)).append("\n"); + sb.append(" seed: ").append(toIndentedString(seed)).append("\n"); + sb.append(" scale: ").append(toIndentedString(scale)).append("\n"); + sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); + sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); + sb.append(" logInterval: ").append(toIndentedString(logInterval)).append("\n"); + sb.append(" format: ").append(toIndentedString(format)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSBSLoadConfig.java b/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSBSLoadConfig.java new file mode 100644 index 0000000..a7b6796 --- /dev/null +++ b/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSBSLoadConfig.java @@ -0,0 +1,148 @@ +/* + * Mowgli Evaluation Orchestrator + * Evaluate the Performance/Scalability/Elasticity/Availability of distributed DBMS in the Cloud + * + * OpenAPI spec version: 0.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.dbms.evaluator.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import de.uulm.omi.cloudiator.dbms.evaluator.model.TSDBMSDBMSProperties; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import javax.validation.constraints.*; + +/** + * TSBSLoadConfig + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2019-11-26T12:37:55.291+01:00") +public class TSBSLoadConfig { + @JsonProperty("numberOfWorkers") + private BigDecimal numberOfWorkers = null; + + @JsonProperty("batchSize") + private BigDecimal batchSize = null; + + @JsonProperty("dbmsPorperties") + private java.util.List dbmsPorperties = null; + + public TSBSLoadConfig numberOfWorkers(BigDecimal numberOfWorkers) { + this.numberOfWorkers = numberOfWorkers; + return this; + } + + /** + * The number of workers to load the ts data into the DBMS + * @return numberOfWorkers + **/ + @JsonProperty("numberOfWorkers") + @ApiModelProperty(example = "2.0", value = "The number of workers to load the ts data into the DBMS") + public BigDecimal getNumberOfWorkers() { + return numberOfWorkers; + } + + public void setNumberOfWorkers(BigDecimal numberOfWorkers) { + this.numberOfWorkers = numberOfWorkers; + } + + public TSBSLoadConfig batchSize(BigDecimal batchSize) { + this.batchSize = batchSize; + return this; + } + + /** + * The batch size to use for inserting the data + * @return batchSize + **/ + @JsonProperty("batchSize") + @ApiModelProperty(example = "1000.0", value = "The batch size to use for inserting the data") + public BigDecimal getBatchSize() { + return batchSize; + } + + public void setBatchSize(BigDecimal batchSize) { + this.batchSize = batchSize; + } + + public TSBSLoadConfig dbmsPorperties(java.util.List dbmsPorperties) { + this.dbmsPorperties = dbmsPorperties; + return this; + } + + public TSBSLoadConfig addDbmsPorpertiesItem(TSDBMSDBMSProperties dbmsPorpertiesItem) { + if (this.dbmsPorperties == null) { + this.dbmsPorperties = new java.util.ArrayList<>(); + } + this.dbmsPorperties.add(dbmsPorpertiesItem); + return this; + } + + /** + * Get dbmsPorperties + * @return dbmsPorperties + **/ + @JsonProperty("dbmsPorperties") + @ApiModelProperty(value = "") + public java.util.List getDbmsPorperties() { + return dbmsPorperties; + } + + public void setDbmsPorperties(java.util.List dbmsPorperties) { + this.dbmsPorperties = dbmsPorperties; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TSBSLoadConfig tsBSLoadConfig = (TSBSLoadConfig) o; + return Objects.equals(this.numberOfWorkers, tsBSLoadConfig.numberOfWorkers) && + Objects.equals(this.batchSize, tsBSLoadConfig.batchSize) && + Objects.equals(this.dbmsPorperties, tsBSLoadConfig.dbmsPorperties); + } + + @Override + public int hashCode() { + return Objects.hash(numberOfWorkers, batchSize, dbmsPorperties); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TSBSLoadConfig {\n"); + + sb.append(" numberOfWorkers: ").append(toIndentedString(numberOfWorkers)).append("\n"); + sb.append(" batchSize: ").append(toIndentedString(batchSize)).append("\n"); + sb.append(" dbmsPorperties: ").append(toIndentedString(dbmsPorperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSBSLoadWorkload.java b/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSBSLoadWorkload.java new file mode 100644 index 0000000..14c12dd --- /dev/null +++ b/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSBSLoadWorkload.java @@ -0,0 +1,191 @@ +/* + * Mowgli Evaluation Orchestrator + * Evaluate the Performance/Scalability/Elasticity/Availability of distributed DBMS in the Cloud + * + * OpenAPI spec version: 0.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.dbms.evaluator.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import de.uulm.omi.cloudiator.dbms.evaluator.model.DBEndpoints; +import de.uulm.omi.cloudiator.dbms.evaluator.model.TSBSDataConfig; +import de.uulm.omi.cloudiator.dbms.evaluator.model.TSBSLoadConfig; +import de.uulm.omi.cloudiator.dbms.evaluator.model.TSBSQueryConfig; +import de.uulm.omi.cloudiator.dbms.evaluator.model.TSBSQueryExecution; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.constraints.*; + +/** + * TSBSLoadWorkload + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2019-11-26T12:37:55.291+01:00") +public class TSBSLoadWorkload { + @JsonProperty("dbEndpoints") + private DBEndpoints dbEndpoints = null; + + @JsonProperty("tsbsDataConfig") + private TSBSDataConfig tsbsDataConfig = null; + + @JsonProperty("tsbsLoadConfig") + private TSBSLoadConfig tsbsLoadConfig = null; + + @JsonProperty("tsbsQueryConfig") + private TSBSQueryConfig tsbsQueryConfig = null; + + @JsonProperty("tsbsQueryExecution") + private TSBSQueryExecution tsbsQueryExecution = null; + + public TSBSLoadWorkload dbEndpoints(DBEndpoints dbEndpoints) { + this.dbEndpoints = dbEndpoints; + return this; + } + + /** + * Get dbEndpoints + * @return dbEndpoints + **/ + @JsonProperty("dbEndpoints") + @ApiModelProperty(value = "") + public DBEndpoints getDbEndpoints() { + return dbEndpoints; + } + + public void setDbEndpoints(DBEndpoints dbEndpoints) { + this.dbEndpoints = dbEndpoints; + } + + public TSBSLoadWorkload tsbsDataConfig(TSBSDataConfig tsbsDataConfig) { + this.tsbsDataConfig = tsbsDataConfig; + return this; + } + + /** + * Get tsbsDataConfig + * @return tsbsDataConfig + **/ + @JsonProperty("tsbsDataConfig") + @ApiModelProperty(value = "") + public TSBSDataConfig getTsbsDataConfig() { + return tsbsDataConfig; + } + + public void setTsbsDataConfig(TSBSDataConfig tsbsDataConfig) { + this.tsbsDataConfig = tsbsDataConfig; + } + + public TSBSLoadWorkload tsbsLoadConfig(TSBSLoadConfig tsbsLoadConfig) { + this.tsbsLoadConfig = tsbsLoadConfig; + return this; + } + + /** + * Get tsbsLoadConfig + * @return tsbsLoadConfig + **/ + @JsonProperty("tsbsLoadConfig") + @ApiModelProperty(value = "") + public TSBSLoadConfig getTsbsLoadConfig() { + return tsbsLoadConfig; + } + + public void setTsbsLoadConfig(TSBSLoadConfig tsbsLoadConfig) { + this.tsbsLoadConfig = tsbsLoadConfig; + } + + public TSBSLoadWorkload tsbsQueryConfig(TSBSQueryConfig tsbsQueryConfig) { + this.tsbsQueryConfig = tsbsQueryConfig; + return this; + } + + /** + * Get tsbsQueryConfig + * @return tsbsQueryConfig + **/ + @JsonProperty("tsbsQueryConfig") + @ApiModelProperty(value = "") + public TSBSQueryConfig getTsbsQueryConfig() { + return tsbsQueryConfig; + } + + public void setTsbsQueryConfig(TSBSQueryConfig tsbsQueryConfig) { + this.tsbsQueryConfig = tsbsQueryConfig; + } + + public TSBSLoadWorkload tsbsQueryExecution(TSBSQueryExecution tsbsQueryExecution) { + this.tsbsQueryExecution = tsbsQueryExecution; + return this; + } + + /** + * Get tsbsQueryExecution + * @return tsbsQueryExecution + **/ + @JsonProperty("tsbsQueryExecution") + @ApiModelProperty(value = "") + public TSBSQueryExecution getTsbsQueryExecution() { + return tsbsQueryExecution; + } + + public void setTsbsQueryExecution(TSBSQueryExecution tsbsQueryExecution) { + this.tsbsQueryExecution = tsbsQueryExecution; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TSBSLoadWorkload tsBSLoadWorkload = (TSBSLoadWorkload) o; + return Objects.equals(this.dbEndpoints, tsBSLoadWorkload.dbEndpoints) && + Objects.equals(this.tsbsDataConfig, tsBSLoadWorkload.tsbsDataConfig) && + Objects.equals(this.tsbsLoadConfig, tsBSLoadWorkload.tsbsLoadConfig) && + Objects.equals(this.tsbsQueryConfig, tsBSLoadWorkload.tsbsQueryConfig) && + Objects.equals(this.tsbsQueryExecution, tsBSLoadWorkload.tsbsQueryExecution); + } + + @Override + public int hashCode() { + return Objects.hash(dbEndpoints, tsbsDataConfig, tsbsLoadConfig, tsbsQueryConfig, tsbsQueryExecution); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TSBSLoadWorkload {\n"); + + sb.append(" dbEndpoints: ").append(toIndentedString(dbEndpoints)).append("\n"); + sb.append(" tsbsDataConfig: ").append(toIndentedString(tsbsDataConfig)).append("\n"); + sb.append(" tsbsLoadConfig: ").append(toIndentedString(tsbsLoadConfig)).append("\n"); + sb.append(" tsbsQueryConfig: ").append(toIndentedString(tsbsQueryConfig)).append("\n"); + sb.append(" tsbsQueryExecution: ").append(toIndentedString(tsbsQueryExecution)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSBSQueryConfig.java b/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSBSQueryConfig.java new file mode 100644 index 0000000..c981512 --- /dev/null +++ b/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSBSQueryConfig.java @@ -0,0 +1,293 @@ +/* + * Mowgli Evaluation Orchestrator + * Evaluate the Performance/Scalability/Elasticity/Availability of distributed DBMS in the Cloud + * + * OpenAPI spec version: 0.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.dbms.evaluator.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import javax.validation.constraints.*; + +/** + * TSBSQueryConfig + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2019-11-26T12:37:55.291+01:00") +public class TSBSQueryConfig { + @JsonProperty("usecase") + private String usecase = null; + + @JsonProperty("seed") + private BigDecimal seed = null; + + @JsonProperty("scale") + private BigDecimal scale = null; + + @JsonProperty("startTime") + private String startTime = null; + + @JsonProperty("endTime") + private String endTime = null; + + @JsonProperty("queries") + private BigDecimal queries = null; + + @JsonProperty("queryType") + private String queryType = null; + + /** + * specifies the data format for the selected DBMS + */ + public enum FormatEnum { + INFLUX("influx"), + + TIMESCALEDB("timescaledb"), + + MONGODB("mongodb"); + + private String value; + + FormatEnum(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FormatEnum fromValue(String text) { + for (FormatEnum b : FormatEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("format") + private FormatEnum format = null; + + public TSBSQueryConfig usecase(String usecase) { + this.usecase = usecase; + return this; + } + + /** + * TODO + * @return usecase + **/ + @JsonProperty("usecase") + @ApiModelProperty(example = "cpu-only", value = "TODO") + public String getUsecase() { + return usecase; + } + + public void setUsecase(String usecase) { + this.usecase = usecase; + } + + public TSBSQueryConfig seed(BigDecimal seed) { + this.seed = seed; + return this; + } + + /** + * By supplying the same seed to the generation programs, each database is loaded with identical data and queried using identical queries. + * @return seed + **/ + @JsonProperty("seed") + @ApiModelProperty(example = "123.0", value = "By supplying the same seed to the generation programs, each database is loaded with identical data and queried using identical queries.") + public BigDecimal getSeed() { + return seed; + } + + public void setSeed(BigDecimal seed) { + this.seed = seed; + } + + public TSBSQueryConfig scale(BigDecimal scale) { + this.scale = scale; + return this; + } + + /** + * TODO + * @return scale + **/ + @JsonProperty("scale") + @ApiModelProperty(example = "1000.0", value = "TODO") + public BigDecimal getScale() { + return scale; + } + + public void setScale(BigDecimal scale) { + this.scale = scale; + } + + public TSBSQueryConfig startTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + * starting timestamp for generating the data + * @return startTime + **/ + @JsonProperty("startTime") + @ApiModelProperty(example = "2016-01-01T00:00:00Z", value = "starting timestamp for generating the data") + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public TSBSQueryConfig endTime(String endTime) { + this.endTime = endTime; + return this; + } + + /** + * ending timestamp for generating the data + * @return endTime + **/ + @JsonProperty("endTime") + @ApiModelProperty(example = "2016-01-04T00:00:00Z", value = "ending timestamp for generating the data") + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public TSBSQueryConfig queries(BigDecimal queries) { + this.queries = queries; + return this; + } + + /** + * TODO + * @return queries + **/ + @JsonProperty("queries") + @ApiModelProperty(example = "20.0", value = "TODO") + public BigDecimal getQueries() { + return queries; + } + + public void setQueries(BigDecimal queries) { + this.queries = queries; + } + + public TSBSQueryConfig queryType(String queryType) { + this.queryType = queryType; + return this; + } + + /** + * specifies one of the supported query type + * @return queryType + **/ + @JsonProperty("queryType") + @ApiModelProperty(example = "single-groupby-1-1-1", value = "specifies one of the supported query type") + public String getQueryType() { + return queryType; + } + + public void setQueryType(String queryType) { + this.queryType = queryType; + } + + public TSBSQueryConfig format(FormatEnum format) { + this.format = format; + return this; + } + + /** + * specifies the data format for the selected DBMS + * @return format + **/ + @JsonProperty("format") + @ApiModelProperty(example = "influx", value = "specifies the data format for the selected DBMS") + public FormatEnum getFormat() { + return format; + } + + public void setFormat(FormatEnum format) { + this.format = format; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TSBSQueryConfig tsBSQueryConfig = (TSBSQueryConfig) o; + return Objects.equals(this.usecase, tsBSQueryConfig.usecase) && + Objects.equals(this.seed, tsBSQueryConfig.seed) && + Objects.equals(this.scale, tsBSQueryConfig.scale) && + Objects.equals(this.startTime, tsBSQueryConfig.startTime) && + Objects.equals(this.endTime, tsBSQueryConfig.endTime) && + Objects.equals(this.queries, tsBSQueryConfig.queries) && + Objects.equals(this.queryType, tsBSQueryConfig.queryType) && + Objects.equals(this.format, tsBSQueryConfig.format); + } + + @Override + public int hashCode() { + return Objects.hash(usecase, seed, scale, startTime, endTime, queries, queryType, format); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TSBSQueryConfig {\n"); + + sb.append(" usecase: ").append(toIndentedString(usecase)).append("\n"); + sb.append(" seed: ").append(toIndentedString(seed)).append("\n"); + sb.append(" scale: ").append(toIndentedString(scale)).append("\n"); + sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); + sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); + sb.append(" queries: ").append(toIndentedString(queries)).append("\n"); + sb.append(" queryType: ").append(toIndentedString(queryType)).append("\n"); + sb.append(" format: ").append(toIndentedString(format)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSBSQueryExecution.java b/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSBSQueryExecution.java new file mode 100644 index 0000000..9812d5b --- /dev/null +++ b/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSBSQueryExecution.java @@ -0,0 +1,124 @@ +/* + * Mowgli Evaluation Orchestrator + * Evaluate the Performance/Scalability/Elasticity/Availability of distributed DBMS in the Cloud + * + * OpenAPI spec version: 0.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.dbms.evaluator.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import de.uulm.omi.cloudiator.dbms.evaluator.model.TSDBMSDBMSProperties; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import javax.validation.constraints.*; + +/** + * TSBSQueryExecution + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2019-11-26T12:37:55.291+01:00") +public class TSBSQueryExecution { + @JsonProperty("workers") + private BigDecimal workers = null; + + @JsonProperty("dbmsPorperties") + private java.util.List dbmsPorperties = null; + + public TSBSQueryExecution workers(BigDecimal workers) { + this.workers = workers; + return this; + } + + /** + * number of worker to execute the workload + * @return workers + **/ + @JsonProperty("workers") + @ApiModelProperty(example = "4.0", value = "number of worker to execute the workload") + public BigDecimal getWorkers() { + return workers; + } + + public void setWorkers(BigDecimal workers) { + this.workers = workers; + } + + public TSBSQueryExecution dbmsPorperties(java.util.List dbmsPorperties) { + this.dbmsPorperties = dbmsPorperties; + return this; + } + + public TSBSQueryExecution addDbmsPorpertiesItem(TSDBMSDBMSProperties dbmsPorpertiesItem) { + if (this.dbmsPorperties == null) { + this.dbmsPorperties = new java.util.ArrayList<>(); + } + this.dbmsPorperties.add(dbmsPorpertiesItem); + return this; + } + + /** + * Get dbmsPorperties + * @return dbmsPorperties + **/ + @JsonProperty("dbmsPorperties") + @ApiModelProperty(value = "") + public java.util.List getDbmsPorperties() { + return dbmsPorperties; + } + + public void setDbmsPorperties(java.util.List dbmsPorperties) { + this.dbmsPorperties = dbmsPorperties; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TSBSQueryExecution tsBSQueryExecution = (TSBSQueryExecution) o; + return Objects.equals(this.workers, tsBSQueryExecution.workers) && + Objects.equals(this.dbmsPorperties, tsBSQueryExecution.dbmsPorperties); + } + + @Override + public int hashCode() { + return Objects.hash(workers, dbmsPorperties); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TSBSQueryExecution {\n"); + + sb.append(" workers: ").append(toIndentedString(workers)).append("\n"); + sb.append(" dbmsPorperties: ").append(toIndentedString(dbmsPorperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSDBMSDBMSProperties.java b/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSDBMSDBMSProperties.java new file mode 100644 index 0000000..e18ef54 --- /dev/null +++ b/src/gen/java/de/uulm/omi/cloudiator/dbms/evaluator/model/TSDBMSDBMSProperties.java @@ -0,0 +1,114 @@ +/* + * Mowgli Evaluation Orchestrator + * Evaluate the Performance/Scalability/Elasticity/Availability of distributed DBMS in the Cloud + * + * OpenAPI spec version: 0.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package de.uulm.omi.cloudiator.dbms.evaluator.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.constraints.*; + +/** + * TSDBMSDBMSProperties + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2019-11-26T12:37:55.291+01:00") +public class TSDBMSDBMSProperties { + @JsonProperty("name") + private String name = null; + + @JsonProperty("value") + private String value = null; + + public TSDBMSDBMSProperties name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @JsonProperty("name") + @ApiModelProperty(example = "-urls", value = "") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public TSDBMSDBMSProperties value(String value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + **/ + @JsonProperty("value") + @ApiModelProperty(example = "http://localhost:8086", value = "") + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TSDBMSDBMSProperties tsDBMSDBMSProperties = (TSDBMSDBMSProperties) o; + return Objects.equals(this.name, tsDBMSDBMSProperties.name) && + Objects.equals(this.value, tsDBMSDBMSProperties.value); + } + + @Override + public int hashCode() { + return Objects.hash(name, value); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TSDBMSDBMSProperties {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/de/uulm/omi/evaluation/scenario/PerformanceTSBSScenario.java b/src/main/java/de/uulm/omi/evaluation/scenario/PerformanceTSBSScenario.java index a923594..2cdb68e 100644 --- a/src/main/java/de/uulm/omi/evaluation/scenario/PerformanceTSBSScenario.java +++ b/src/main/java/de/uulm/omi/evaluation/scenario/PerformanceTSBSScenario.java @@ -16,6 +16,7 @@ import de.uulm.omi.evaluation.task.CheckWorkload; import de.uulm.omi.evaluation.task.CleanUpResources; import de.uulm.omi.evaluation.task.CleanUpRun; import de.uulm.omi.evaluation.task.DeployDB; +import de.uulm.omi.evaluation.task.FetchTSBSResult; import de.uulm.omi.evaluation.task.InitEvaluation; import de.uulm.omi.evaluation.task.InitRun; import org.jeasy.flows.engine.WorkFlowEngine; @@ -59,8 +60,7 @@ public class PerformanceTSBSScenario extends EvaluationScenario { performanceTSBS.getWorkloadInstances()); //TODO: implement a custom fetch method for TSBS! - //FetchYcsbResult fetchYcsbResult = new FetchYcsbResult(this.evaluationContext, this.workloadPhaseContext, YcsbWorkloadType.LOAD, performanceYCSBWrite - // .getWorkloadInstances()); + FetchTSBSResult fetchTSBSResult = new FetchTSBSResult(this.evaluationContext, this.workloadPhaseContext, performanceTSBS.getWorkloadInstances()); //TODO: check for refactoring @@ -96,7 +96,7 @@ public class PerformanceTSBSScenario extends EvaluationScenario { .execute(checkDeployment) //.execute(ycsbWorkload) .execute(checkWorkload) - //.execute(fetchYcsbResult) + .execute(fetchTSBSResult) //.execute(mergeYCSB) //.execute(evaluationTimeseries) //.execute(workloadTimeseries) diff --git a/src/main/java/de/uulm/omi/evaluation/task/FetchTSBSResult.java b/src/main/java/de/uulm/omi/evaluation/task/FetchTSBSResult.java new file mode 100644 index 0000000..404a0f9 --- /dev/null +++ b/src/main/java/de/uulm/omi/evaluation/task/FetchTSBSResult.java @@ -0,0 +1,72 @@ +package de.uulm.omi.evaluation.task; + +import com.google.common.io.Files; +import de.uulm.omi.cloudiator.dbms.evaluator.model.EvaluationContext; +import de.uulm.omi.cloudiator.dbms.evaluator.model.WorkloadPhaseContext; +import de.uulm.omi.dbms.workload.api.DefaultApi; +import de.uulm.omi.dbms.workload.client.ApiException; +import de.uulm.omi.utils.WorkloadApiClientHelper; +import java.io.File; +import java.io.IOException; +import java.util.List; +import org.jeasy.flows.work.DefaultWorkReport; +import org.jeasy.flows.work.WorkReport; +import org.jeasy.flows.work.WorkStatus; + +/** + * Created by Daniel Seybold on 27.04.2018. + */ +public class FetchTSBSResult extends EvaluationTask { + + private final WorkloadPhaseContext workloadPhaseContext; + private final List workloadInstances; + + public FetchTSBSResult(EvaluationContext evaluationContext, WorkloadPhaseContext workloadPhaseContext, List workloadInstances) { + super(TaskType.FETCH_WORKLOAD, evaluationContext); + + this.workloadPhaseContext = workloadPhaseContext; + this.workloadInstances = workloadInstances; + + } + + @Override + public WorkReport call() { + + List apiInstances = WorkloadApiClientHelper.getWorkloadClients(workloadInstances); + + String loggerPrefix= "RUN " + this.evaluationContext.getRunCounter().intValue() +": "; + + for (DefaultApi apiInstance : apiInstances) { + + try { + File tmpResultFile = apiInstance.workloadResultGet("tsbs" + evaluationContext.getRunCounter().intValue() + "_" + this.evaluationContext.getScenarioType(), "TSBS"); + LOGGER.debug(loggerPrefix + "Tmp result file location:" + tmpResultFile.getAbsolutePath()); + + String dataUri; + dataUri = this.evaluationContext.getEvluationRun() + File.separator + EvaluationTask.DATA_FOLDER + File.separator + apiInstances.indexOf(apiInstance); + + + LOGGER.debug(loggerPrefix + "Storing TSBS workload result file under: " + dataUri); + + File resultFile = new File(dataUri); + + Files.move(tmpResultFile, resultFile); + + } catch (ApiException e) { + LOGGER.error(loggerPrefix + "Error while fetching workload result!", e); + return new DefaultWorkReport(WorkStatus.FAILED); + + } catch (IOException e) { + + LOGGER.error(loggerPrefix + "Error while moving workload result!", e); + return new DefaultWorkReport(WorkStatus.FAILED); + } + } + + + LOGGER.debug(loggerPrefix + "Successfully fetched workload result and stored to disk!"); + return new DefaultWorkReport(WorkStatus.COMPLETED); + } + + +} -- GitLab