Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
W
workload-API
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
3
Issues
3
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mowgli
workload-API
Commits
9823ab0e
Commit
9823ab0e
authored
Oct 14, 2019
by
Julia Abramenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- deleted parameter in executeQueries(), not necessary
parent
c680dc5b
Pipeline
#60537
failed with stage
in 14 minutes and 25 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
18 deletions
+27
-18
src/main/java/de/uulm/omi/dbms/workload/api/impl/WorkloadApiServiceImpl.java
...lm/omi/dbms/workload/api/impl/WorkloadApiServiceImpl.java
+1
-1
src/main/java/de/uulm/omi/workload/tsbs/TSBSCommandBuilder.java
...in/java/de/uulm/omi/workload/tsbs/TSBSCommandBuilder.java
+26
-17
No files found.
src/main/java/de/uulm/omi/dbms/workload/api/impl/WorkloadApiServiceImpl.java
View file @
9823ab0e
...
...
@@ -222,7 +222,7 @@ public class WorkloadApiServiceImpl extends WorkloadApiService {
// Execute Queries
String
exeQueries
=
"cat "
+
queriesToExecute
+
" | gunzip | "
;
exeQueries
+=
TSBSCommandBuilder
.
executeQueries
(
workload
.
getTsbsDataConfig
(),
workload
.
getTsbsQueryExecution
()
,
queriesToExecute
);
exeQueries
+=
TSBSCommandBuilder
.
executeQueries
(
workload
.
getTsbsDataConfig
(),
workload
.
getTsbsQueryExecution
()
/*, queriesToExecute*/
);
exeQueries
+=
" > "
+
TSBS_RESULT_FOLDER
+
"query_execution.csv"
;
System
.
out
.
println
(
exeQueries
);
workloadProcess
...
...
src/main/java/de/uulm/omi/workload/tsbs/TSBSCommandBuilder.java
View file @
9823ab0e
...
...
@@ -42,15 +42,7 @@ public class TSBSCommandBuilder {
else
fail
=
true
;
if
(
dataConfig
.
getFormat
()
!=
null
)
{
generateDataCommand
+=
"-format=\""
+
dataConfig
.
getFormat
()+
"\""
;
}
else
fail
=
true
;
System
.
out
.
println
(
generateDataCommand
);
// save resulting output in a gzip file
//assert dataConfig.getFormat() != null;
//generateDataCommand += "| gzip > " + tsbsResultFolder + dataConfig.getFormat() + "-data.gz";
}
else
fail
=
true
;
if
(
fail
)
{
LOGGER
.
error
(
"Required arguments are missing\n"
+
"One of the following:"
);
LOGGER
.
info
(
"Arguments needed: \n"
+
...
...
@@ -96,7 +88,6 @@ public class TSBSCommandBuilder {
if
(
queryConfig
.
getFormat
()
!=
null
)
{
generateQueryCommand
+=
"-format="
+
"\""
+
queryConfig
.
getFormat
()
+
"\" "
;
}
else
fail
=
true
;
System
.
out
.
println
(
generateQueryCommand
);
if
(
fail
)
{
LOGGER
.
error
(
"Required arguments are missing\n"
+
"One of the following:"
);
LOGGER
.
info
(
"Arguments needed: \n"
+
...
...
@@ -113,7 +104,7 @@ public class TSBSCommandBuilder {
else
return
generateQueryCommand
;
}
@Deprecated
public
static
String
loadCommand
(
TSBSDataConfig
dataConfig
,
TSBSLoadConfig
loadConfig
,
String
fileToLoad
)
{
checkNotNull
(
dataConfig
);
boolean
fail
=
false
;
...
...
@@ -131,7 +122,6 @@ public class TSBSCommandBuilder {
}
}
else
fail
=
true
;
loadingCommand
+=
"-file="
+
"\""
+
fileToLoad
+
"\""
;
System
.
out
.
println
(
loadingCommand
);
if
(
fail
)
{
LOGGER
.
error
(
"Loading command cannot be executed."
);
return
""
;
...
...
@@ -140,23 +130,42 @@ public class TSBSCommandBuilder {
}
public
static
String
executeQueries
(
TSBSDataConfig
dataConfig
,
TSBSQueryExecution
quExe
,
String
queriesToExecute
)
{
String
exeQueries
=
"tsbs_load_"
+
dataConfig
.
getFormat
()
+
" "
;
public
static
String
measurePerformance
(
TSBSDataConfig
dataConfig
,
TSBSLoadConfig
loadConfig
,
String
TSBSResultFolder
,
String
ScriptFolder
)
{
checkNotNull
(
dataConfig
);
checkNotNull
(
loadConfig
);
String
loadingCommand
=
""
;
boolean
fail
=
false
;
if
(
loadConfig
.
getNumberOfWorkers
().
intValue
()
>
0
)
{
loadingCommand
+=
"NUM_WORKERS="
+
loadConfig
.
getNumberOfWorkers
()
+
" "
;
}
else
fail
=
true
;
if
(
loadConfig
.
getBatchSize
().
intValue
()
>
0
)
{
loadingCommand
+=
"BATCH_SIZE="
+
loadConfig
.
getBatchSize
()
+
" "
;
}
else
fail
=
true
;
loadingCommand
+=
"BULK_DATA_DIR="
+
TSBSResultFolder
+
" "
;
loadingCommand
+=
ScriptFolder
+
"load_"
+
dataConfig
.
getFormat
()
+
".sh"
;
if
(
fail
)
{
LOGGER
.
error
(
"Loading command cannot be executed."
);
return
""
;
}
else
return
loadingCommand
;
}
public
static
String
executeQueries
(
TSBSDataConfig
dataConfig
,
TSBSQueryExecution
quExe
/*, String queriesToExecute*/
)
{
String
exeQueries
=
"tsbs_run_queries_"
+
dataConfig
.
getFormat
()
+
" "
;
boolean
fail
=
false
;
if
(
quExe
.
getWorkers
().
intValue
()
>
0
)
{
exeQueries
+=
"-workers="
+
quExe
.
getWorkers
()
+
" "
;
exeQueries
+=
"-
-
workers="
+
quExe
.
getWorkers
()
+
" "
;
}
else
fail
=
true
;
if
(
quExe
.
getDbmsPorperties
().
size
()
>
0
)
{
for
(
TSDBMSDBMSProperties
prop
:
quExe
.
getDbmsPorperties
())
{
exeQueries
+=
prop
.
getName
()
+
"=\""
+
prop
.
getValue
()
+
"\" "
;
}
}
else
fail
=
true
;
System
.
out
.
println
(
exeQueries
);
if
(
fail
)
{
LOGGER
.
error
(
"Query execution cannot be executed."
);
return
""
;
}
else
{
exeQueries
+=
"-file="
+
"\""
+
queriesToExecute
+
"\""
;
//
exeQueries += "-file=" + "\"" + queriesToExecute + "\"";
return
exeQueries
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment