Commit 9556c87c authored by Daniel Seybold's avatar Daniel Seybold
Browse files

finished first implementation for tsbs test run

parent f0868e18
Pipeline #80495 failed with stage
in 13 minutes and 28 seconds
......@@ -24,7 +24,7 @@ import javax.validation.constraints.*;
/**
* WorkloadConfig
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-03-04T13:06:39.426+01:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-05-08T09:12:19.262+02:00")
public class WorkloadConfig {
/**
* Gets or Sets workloadType
......
......@@ -21,7 +21,7 @@ import javax.validation.constraints.*;
* endpoints of workload instances for this scenario
*/
@ApiModel(description = "endpoints of workload instances for this scenario")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-03-04T13:06:39.426+01:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-05-08T09:12:19.262+02:00")
public class WorkloadInstances extends java.util.ArrayList<String> {
@Override
......
......@@ -25,7 +25,7 @@ import javax.validation.constraints.*;
* context object of the workloadAPI for the each workload phase
*/
@ApiModel(description = "context object of the workloadAPI for the each workload phase")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-03-04T13:06:39.426+01:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-05-08T09:12:19.262+02:00")
public class WorkloadPhaseContext {
/**
* Gets or Sets workloadType
......
......@@ -27,7 +27,7 @@ import javax.validation.constraints.*;
/**
* YCSBWorkload
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-03-04T13:06:39.426+01:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-05-08T09:12:19.262+02:00")
public class YCSBWorkload {
@JsonProperty("dbEndpoints")
private DBEndpoints dbEndpoints = null;
......
package de.uulm.omi.dbms.evlautor.server.api;
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-03-04T13:06:39.426+01:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-05-08T09:12:19.262+02:00")
public class ApiException extends Exception{
private int code;
public ApiException (int code, String msg) {
......
......@@ -5,7 +5,7 @@ import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.HttpServletResponse;
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-03-04T13:06:39.426+01:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-05-08T09:12:19.262+02:00")
public class ApiOriginFilter implements javax.servlet.Filter {
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
......
......@@ -3,7 +3,7 @@ package de.uulm.omi.dbms.evlautor.server.api;
import javax.xml.bind.annotation.XmlTransient;
@javax.xml.bind.annotation.XmlRootElement
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-03-04T13:06:39.426+01:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-05-08T09:12:19.262+02:00")
public class ApiResponseMessage {
public static final int ERROR = 1;
public static final int WARNING = 2;
......
package de.uulm.omi.dbms.evlautor.server.api;
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-03-04T13:06:39.426+01:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-05-08T09:12:19.262+02:00")
public class NotFoundException extends ApiException {
private int code;
public NotFoundException (int code, String msg) {
......
......@@ -29,7 +29,7 @@ import javax.validation.constraints.*;
@Produces({ "application/json" })
@io.swagger.annotations.Api(description = "the processing API")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-03-04T13:06:39.426+01:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-05-08T09:12:19.262+02:00")
public class ProcessingApi {
private final ProcessingApiService delegate;
......
......@@ -15,7 +15,7 @@ import java.io.InputStream;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
import javax.validation.constraints.*;
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-03-04T13:06:39.426+01:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-05-08T09:12:19.262+02:00")
public abstract class ProcessingApiService {
public abstract Response processingBoxplotPost( @NotNull String plotName,java.util.List<PlotItem> plotData,SecurityContext securityContext) throws NotFoundException;
}
package de.uulm.omi.dbms.evlautor.server.api;
import de.uulm.omi.cloudiator.dbms.evaluator.model.*;
import de.uulm.omi.dbms.evlautor.server.api.ScenarioApiService;
import de.uulm.omi.dbms.evlautor.server.api.factories.ScenarioApiServiceFactory;
import io.swagger.annotations.ApiParam;
import io.swagger.jaxrs.*;
import de.uulm.omi.cloudiator.dbms.evaluator.model.AvailabilityYCSBMultiPhase;
import de.uulm.omi.cloudiator.dbms.evaluator.model.AvailabilityYCSBWrite;
import de.uulm.omi.cloudiator.dbms.evaluator.model.ElasticityYCSBMultiPhase;
......@@ -22,28 +15,22 @@ import de.uulm.omi.cloudiator.dbms.evaluator.model.PerformanceYCSBWrite;
import de.uulm.omi.cloudiator.dbms.evaluator.model.ScalabilityTPCC;
import de.uulm.omi.cloudiator.dbms.evaluator.model.ScalabilityYCSBMultiPhase;
import de.uulm.omi.cloudiator.dbms.evaluator.model.ScalabilityYCSBWrite;
import java.util.Map;
import java.util.List;
import de.uulm.omi.dbms.evlautor.server.api.NotFoundException;
import java.io.InputStream;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam;
import de.uulm.omi.dbms.evlautor.server.api.factories.ScenarioApiServiceFactory;
import io.swagger.annotations.ApiParam;
import javax.servlet.ServletConfig;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.*;
import javax.validation.constraints.*;
@Path("/scenario")
@Produces({ "application/json" })
@io.swagger.annotations.Api(description = "the scenario API")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-03-04T13:06:39.426+01:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-05-08T09:12:19.262+02:00")
public class ScenarioApi {
private final ScenarioApiService delegate;
......@@ -210,7 +197,7 @@ public class ScenarioApi {
@io.swagger.annotations.ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public Response scenarioPerformanceMultiPhasePost(@ApiParam(value = "the scenario type identifier which will be used to create | the root folder for the evaluation results",required=true, allowableValues="Performance-YCSB-MULTI-PHASE") @QueryParam("scenarioType") String scenarioType
,@ApiParam(value = "the cloud type identifier which will be used to create | the 2nd level folder for the evaluation results",required=true, allowableValues="OPENSTACK, EC2") @QueryParam("cloud") String cloud
,@ApiParam(value = "the DBMS type identifier which will be used to create | the 3nd level folder for the evaluation results",required=true, allowableValues="CASSANDRA, COUCHBASE, MONGODB, COCKROACHDB, RIAK, ELASTICSEARCH") @QueryParam("dbmsType") String dbmsType
,@ApiParam(value = "the DBMS type identifier which will be used to create | the 3nd level folder for the evaluation results",required=true, allowableValues="CASSANDRA, COUCHBASE, MONGODB, COCKROACHDB, RIAK, ELASTICSEARCH, POSTGRESQL") @QueryParam("dbmsType") String dbmsType
,@ApiParam(value = "a custom string to describe relevant dbms configuration | for the this evaluation scenario, will be used for the 4th level of the evaluation results",required=true) @QueryParam("dbmsConfiguration") String dbmsConfiguration
,@ApiParam(value = "the number of interative evaluation runs",required=true) @QueryParam("runs") Integer runs
,@ApiParam(value = "delete all resources after each run",required=true) @QueryParam("cleanUp") Boolean cleanUp
......@@ -232,7 +219,7 @@ public class ScenarioApi {
@io.swagger.annotations.ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public Response scenarioPerformancePost(@ApiParam(value = "the scenario type identifier which will be used to create | the root folder for the evaluation results",required=true, allowableValues="Performance-YCSB-WRITE") @QueryParam("scenarioType") String scenarioType
,@ApiParam(value = "the cloud type identifier which will be used to create | the 2nd level folder for the evaluation results",required=true, allowableValues="OPENSTACK, EC2") @QueryParam("cloud") String cloud
,@ApiParam(value = "the DBMS type identifier which will be used to create | the 3nd level folder for the evaluation results",required=true, allowableValues="CASSANDRA, COUCHBASE, MONGODB, COCKROACHDB, RIAK, ELASTICSEARCH") @QueryParam("dbmsType") String dbmsType
,@ApiParam(value = "the DBMS type identifier which will be used to create | the 3nd level folder for the evaluation results",required=true, allowableValues="CASSANDRA, COUCHBASE, MONGODB, COCKROACHDB, RIAK, ELASTICSEARCH, POSTGRESQL") @QueryParam("dbmsType") String dbmsType
,@ApiParam(value = "a custom string to describe relevant dbms configuration | for the this evaluation scenario, will be used for the 4th level of the evaluation results",required=true) @QueryParam("dbmsConfiguration") String dbmsConfiguration
,@ApiParam(value = "the number of interative evaluation runs",required=true) @QueryParam("runs") Integer runs
,@ApiParam(value = "delete all resources after each run",required=true) @QueryParam("cleanUp") Boolean cleanUp
......@@ -276,7 +263,7 @@ public class ScenarioApi {
@io.swagger.annotations.ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public Response scenarioPerformanceTSBSPost(@ApiParam(value = "the scenario type identifier which will be used to create | the root folder for the evaluation results",required=true, allowableValues="Performance-TSBS") @QueryParam("scenarioType") String scenarioType
,@ApiParam(value = "the cloud type identifier which will be used to create | the 2nd level folder for the evaluation results",required=true, allowableValues="OPENSTACK, EC2") @QueryParam("cloud") String cloud
,@ApiParam(value = "the DBMS type identifier which will be used to create | the 3nd level folder for the evaluation results",required=true, allowableValues="CASSANDRA, COUCHBASE, MONGODB, COCKROACHDB, RIAK, ELASTICSEARCH, INFLUXDB, POSTGRESQL, TIMESCALE") @QueryParam("dbmsType") String dbmsType
,@ApiParam(value = "the DBMS type identifier which will be used to create | the 3nd level folder for the evaluation results",required=true, allowableValues="CASSANDRA, MONGODB, INFLUXDB, POSTGRESQL, TIMESCALEDB") @QueryParam("dbmsType") String dbmsType
,@ApiParam(value = "a custom string to describe relevant dbms configuration | for the this evaluation scenario, will be used for the 4th level of the evaluation results",required=true) @QueryParam("dbmsConfiguration") String dbmsConfiguration
,@ApiParam(value = "the number of interative evaluation runs",required=true) @QueryParam("runs") Integer runs
,@ApiParam(value = "delete all resources after each run",required=true) @QueryParam("cleanUp") Boolean cleanUp
......
......@@ -29,7 +29,7 @@ import java.io.InputStream;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
import javax.validation.constraints.*;
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-03-04T13:06:39.426+01:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-05-08T09:12:19.262+02:00")
public abstract class ScenarioApiService {
public abstract Response scenarioAvailabilityMultiPhasePost( @NotNull String scenarioType, @NotNull String cloud, @NotNull String dbmsType, @NotNull String dbmsConfiguration, @NotNull Integer runs, @NotNull Boolean cleanUp,AvailabilityYCSBMultiPhase scenarioSpec,SecurityContext securityContext) throws NotFoundException;
public abstract Response scenarioAvailabilityPost( @NotNull String scenarioType, @NotNull String cloud, @NotNull String dbmsType, @NotNull String dbmsConfiguration, @NotNull Integer runs, @NotNull Boolean cleanUp,AvailabilityYCSBWrite scenarioSpec,SecurityContext securityContext) throws NotFoundException;
......
package de.uulm.omi.dbms.evlautor.server.api;
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-03-04T13:06:39.426+01:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-05-08T09:12:19.262+02:00")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
......
......@@ -35,7 +35,7 @@ import javax.validation.constraints.*;
@Produces({ "application/json" })
@io.swagger.annotations.Api(description = "the template API")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-03-04T13:06:39.426+01:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-05-08T09:12:19.262+02:00")
public class TemplateApi {
private final TemplateApiService delegate;
......
......@@ -21,7 +21,7 @@ import java.io.InputStream;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
import javax.validation.constraints.*;
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-03-04T13:06:39.426+01:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-05-08T09:12:19.262+02:00")
public abstract class TemplateApiService {
public abstract Response templateCloudGet(SecurityContext securityContext) throws NotFoundException;
public abstract Response templateCloudPost( @NotNull String api, @NotNull String apiVersion, @NotNull String user, @NotNull String secret,CloudConfiguration cloudConfiguration, String apiEndpoint,SecurityContext securityContext) throws NotFoundException;
......
......@@ -3,7 +3,7 @@ package de.uulm.omi.dbms.evlautor.server.api.factories;
import de.uulm.omi.dbms.evlautor.server.api.ProcessingApiService;
import de.uulm.omi.dbms.evlautor.server.api.impl.ProcessingApiServiceImpl;
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-03-04T13:06:39.426+01:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-05-08T09:12:19.262+02:00")
public class ProcessingApiServiceFactory {
private final static ProcessingApiService service = new ProcessingApiServiceImpl();
......
......@@ -3,7 +3,7 @@ package de.uulm.omi.dbms.evlautor.server.api.factories;
import de.uulm.omi.dbms.evlautor.server.api.ScenarioApiService;
import de.uulm.omi.dbms.evlautor.server.api.impl.ScenarioApiServiceImpl;
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-03-04T13:06:39.426+01:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-05-08T09:12:19.262+02:00")
public class ScenarioApiServiceFactory {
private final static ScenarioApiService service = new ScenarioApiServiceImpl();
......
......@@ -3,7 +3,7 @@ package de.uulm.omi.dbms.evlautor.server.api.factories;
import de.uulm.omi.dbms.evlautor.server.api.TemplateApiService;
import de.uulm.omi.dbms.evlautor.server.api.impl.TemplateApiServiceImpl;
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-03-04T13:06:39.426+01:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2020-05-08T09:12:19.262+02:00")
public class TemplateApiServiceFactory {
private final static TemplateApiService service = new TemplateApiServiceImpl();
......
......@@ -60,8 +60,9 @@ public class PerformanceTSBSScenario extends EvaluationScenario {
CheckWorkload checkWorkload = new CheckWorkload(this.evaluationContext, this.workloadPhaseContext,
performanceTSBS.getWorkloadInstances());
//TODO: implement a custom fetch method for TSBS!
FetchTSBSResult fetchTSBSResult = new FetchTSBSResult(this.evaluationContext, this.workloadPhaseContext, performanceTSBS.getWorkloadInstances());
FetchTSBSResult fetchTSBSResultLoad = new FetchTSBSResult(this.evaluationContext, this.workloadPhaseContext, performanceTSBS.getWorkloadInstances(), "load");
FetchTSBSResult fetchTSBSResultQuery = new FetchTSBSResult(this.evaluationContext, this.workloadPhaseContext, performanceTSBS.getWorkloadInstances(), "query");
//TODO: check for refactoring
......@@ -97,7 +98,8 @@ public class PerformanceTSBSScenario extends EvaluationScenario {
.execute(checkDeployment)
.execute(tsbsWorkload)
.execute(checkWorkload)
.execute(fetchTSBSResult)
.execute(fetchTSBSResultLoad)
.execute(fetchTSBSResultQuery)
//.execute(mergeYCSB)
//.execute(evaluationTimeseries)
//.execute(workloadTimeseries)
......
......@@ -18,14 +18,22 @@ import org.jeasy.flows.work.WorkStatus;
*/
public class FetchTSBSResult extends EvaluationTask {
private final WorkloadPhaseContext workloadPhaseContext;
private final List<String> workloadInstances;
private final String RESULT_TYPE;
public FetchTSBSResult(EvaluationContext evaluationContext, WorkloadPhaseContext workloadPhaseContext, List<String> workloadInstances) {
public FetchTSBSResult(EvaluationContext evaluationContext, WorkloadPhaseContext workloadPhaseContext, List<String> workloadInstances, String resultType) {
super(TaskType.FETCH_WORKLOAD, evaluationContext);
this.workloadPhaseContext = workloadPhaseContext;
this.workloadInstances = workloadInstances;
this.RESULT_TYPE = resultType;
}
......@@ -39,7 +47,17 @@ public class FetchTSBSResult extends EvaluationTask {
for (DefaultApi apiInstance : apiInstances) {
try {
File tmpResultFile = apiInstance.workloadResultGet("tsbs" + evaluationContext.getRunCounter().intValue() + "_" + this.evaluationContext.getScenarioType(), "TSBS");
File tmpResultFile = null;
if(RESULT_TYPE.equals("load")){
tmpResultFile = apiInstance.workloadResultGet("tsbs" + evaluationContext.getRunCounter().intValue() + "_" + this.evaluationContext.getScenarioType() + "_load", "TSBS");
}else if (RESULT_TYPE.equals("query")){
tmpResultFile = apiInstance.workloadResultGet("tsbs" + evaluationContext.getRunCounter().intValue() + "_" + this.evaluationContext.getScenarioType(), "TSBS");
}else{
LOGGER.error("Unkown result type: " + this.RESULT_TYPE + "! Supported types are: load, query!" );
return new DefaultWorkReport(WorkStatus.FAILED);
}
LOGGER.debug(loggerPrefix + "Tmp result file location:" + tmpResultFile.getAbsolutePath());
String dataUri;
......@@ -52,6 +70,7 @@ public class FetchTSBSResult extends EvaluationTask {
Files.move(tmpResultFile, resultFile);
} catch (ApiException e) {
LOGGER.error(loggerPrefix + "Error while fetching workload result!", e);
return new DefaultWorkReport(WorkStatus.FAILED);
......
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