Commit 3af84e43 authored by Daniel Seybold's avatar Daniel Seybold

more fixes for tpc-c

parent 2ccc2b48
Pipeline #74065 passed with stage
in 14 minutes and 30 seconds
...@@ -119,6 +119,10 @@ public class WorkloadApiServiceImpl extends WorkloadApiService { ...@@ -119,6 +119,10 @@ public class WorkloadApiServiceImpl extends WorkloadApiService {
properties.getProperty(WorkloadApiProperties.WORKLOAD_RESULTS_FOLDER) + TPCC_RESULT_FOLDER properties.getProperty(WorkloadApiProperties.WORKLOAD_RESULTS_FOLDER) + TPCC_RESULT_FOLDER
+ taskId + ".txt"; + taskId + ".txt";
WorkloadProcessInstance workloadProcessInstance = new WorkloadProcessInstance();
/*
//TODO: use this code for the future with an explicit init phase
//Init the workload //Init the workload
Long workloadTimestamp = System.currentTimeMillis(); Long workloadTimestamp = System.currentTimeMillis();
...@@ -131,7 +135,7 @@ public class WorkloadApiServiceImpl extends WorkloadApiService { ...@@ -131,7 +135,7 @@ public class WorkloadApiServiceImpl extends WorkloadApiService {
workloadTimestamp); workloadTimestamp);
WorkloadProcessInstance workloadProcessInstance = new WorkloadProcessInstance();
workloadProcessInstance.setTimestamp(BigDecimal.valueOf(workloadProcess.getStartTimestamp())); workloadProcessInstance.setTimestamp(BigDecimal.valueOf(workloadProcess.getStartTimestamp()));
workloadProcessInstance.setProcessId(workloadProcess.getProcessId()); workloadProcessInstance.setProcessId(workloadProcess.getProcessId());
...@@ -165,8 +169,10 @@ public class WorkloadApiServiceImpl extends WorkloadApiService { ...@@ -165,8 +169,10 @@ public class WorkloadApiServiceImpl extends WorkloadApiService {
LOGGER.debug("TPC-C init finished, now starting the TPC-C execution!"); LOGGER.debug("TPC-C init finished, now starting the TPC-C execution!");
*/
//Run the workload //Run the workload
workloadTimestamp = System.currentTimeMillis(); Long workloadTimestamp = System.currentTimeMillis();
String startCommand = ""; String startCommand = "";
startCommand = TPCCCommandBuilder.buildStartCommand(workload.getTpccWorkloadConfig(), workload.getDbEndpoints(), TPCC_BINARY); startCommand = TPCCCommandBuilder.buildStartCommand(workload.getTpccWorkloadConfig(), workload.getDbEndpoints(), TPCC_BINARY);
......
...@@ -66,12 +66,10 @@ public class TPCCCommandBuilder { ...@@ -66,12 +66,10 @@ public class TPCCCommandBuilder {
workloadCommand += " --histograms \"" + workload.getHistogram() + ".txt\" "; workloadCommand += " --histograms \"" + workload.getHistogram() + ".txt\" ";
} }
//TODO: remove as this is deprecated //TODO: remove for the future as it will not be supported for CockroachDB 2.0
/*
if (workload.isInit()){ if (workload.isInit()){
workloadCommand += " --init "; workloadCommand += " --init ";
} }
*/
if (workload.isInterleaved()){ if (workload.isInterleaved()){
...@@ -122,10 +120,14 @@ public class TPCCCommandBuilder { ...@@ -122,10 +120,14 @@ public class TPCCCommandBuilder {
workloadCommand += " --tolerate-errors "; workloadCommand += " --tolerate-errors ";
} }
//TODO: needs to be changed to expect a number!
/*
if (workload.isWait()){ if (workload.isWait()){
workloadCommand += " --wait "; workloadCommand += " --wait ";
} }
*/
if (workload.getWarehouses().intValue() > 0){ if (workload.getWarehouses().intValue() > 0){
workloadCommand += " --warehouses " + workload.getWarehouses().intValue(); workloadCommand += " --warehouses " + workload.getWarehouses().intValue();
} }
...@@ -145,7 +147,7 @@ public class TPCCCommandBuilder { ...@@ -145,7 +147,7 @@ public class TPCCCommandBuilder {
String connectionUrl; String connectionUrl;
StringJoiner dbmsEndpoints = new StringJoiner(","); StringJoiner dbmsEndpoints = new StringJoiner(" ");
for(DBEndpoint endpoint : dbEndpoints){ for(DBEndpoint endpoint : dbEndpoints){
String postgresEndpoint; String postgresEndpoint;
...@@ -156,10 +158,12 @@ public class TPCCCommandBuilder { ...@@ -156,10 +158,12 @@ public class TPCCCommandBuilder {
postgresEndpoint = endpoint.getIpAddress() + ":26257"; postgresEndpoint = endpoint.getIpAddress() + ":26257";
} }
dbmsEndpoints.add(postgresEndpoint); String postgresUrl = "\"postgresql://" + postgresEndpoint+"?sslmode=disable\"";
dbmsEndpoints.add(postgresUrl);
} }
connectionUrl = " \"postgresql://" + dbmsEndpoints.toString() + "?sslmode=disable\""; connectionUrl = " " + dbmsEndpoints.toString();
LOGGER.debug("DBMS connection URL for TPC-C is: " + connectionUrl); LOGGER.debug("DBMS connection URL for TPC-C is: " + connectionUrl);
......
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