Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
cld
workloads
tpcds
Commits
468acf3b
Commit
468acf3b
authored
May 10, 2016
by
Jeff Rasley
Browse files
Added timing info into workload gen
parent
ecf5b016
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/edu/brown/cs/systems/tpcds/spark/SparkTPCDSWorkloadGenerator.java
View file @
468acf3b
...
@@ -56,7 +56,9 @@ public class SparkTPCDSWorkloadGenerator {
...
@@ -56,7 +56,9 @@ public class SparkTPCDSWorkloadGenerator {
System
.
out
.
println
(
"Expected argument specifying dataset and query, eg impala-tpcds-modified-queries/q19.sql"
);
System
.
out
.
println
(
"Expected argument specifying dataset and query, eg impala-tpcds-modified-queries/q19.sql"
);
return
;
return
;
}
}
long
preLoad
=
System
.
currentTimeMillis
();
// Load the benchmark
// Load the benchmark
String
[]
splits
=
args
[
0
].
split
(
File
.
separator
);
String
[]
splits
=
args
[
0
].
split
(
File
.
separator
);
Benchmark
b
=
QueryUtils
.
load
().
get
(
splits
[
0
]);
Benchmark
b
=
QueryUtils
.
load
().
get
(
splits
[
0
]);
...
@@ -86,7 +88,9 @@ public class SparkTPCDSWorkloadGenerator {
...
@@ -86,7 +88,9 @@ public class SparkTPCDSWorkloadGenerator {
TPCDSSettings
settings
=
TPCDSSettings
.
createWithDefaults
();
TPCDSSettings
settings
=
TPCDSSettings
.
createWithDefaults
();
System
.
out
.
printf
(
"Running query %s on %s dataset $s\n"
,
q
,
settings
.
dataFormat
,
settings
.
dataLocation
);
System
.
out
.
printf
(
"Running query %s on %s dataset $s\n"
,
q
,
settings
.
dataFormat
,
settings
.
dataLocation
);
SparkTPCDSWorkloadGenerator
gen
=
spinUp
(
"SparkTPCDSWorkloadGenerator"
,
settings
);
SparkTPCDSWorkloadGenerator
gen
=
spinUp
(
"SparkTPCDSWorkloadGenerator"
,
settings
);
long
postLoad
=
System
.
currentTimeMillis
();
// Run the query
// Run the query
Row
[]
rows
=
gen
.
sqlContext
.
sql
(
q
.
queryText
).
collect
();
Row
[]
rows
=
gen
.
sqlContext
.
sql
(
q
.
queryText
).
collect
();
...
@@ -94,6 +98,9 @@ public class SparkTPCDSWorkloadGenerator {
...
@@ -94,6 +98,9 @@ public class SparkTPCDSWorkloadGenerator {
for
(
Row
r
:
rows
)
{
for
(
Row
r
:
rows
)
{
System
.
out
.
println
(
r
);
System
.
out
.
println
(
r
);
}
}
long
postQ
=
System
.
currentTimeMillis
();
System
.
out
.
println
(
"Load time: "
+
(
postLoad
-
preLoad
)
+
", Query time: "
+
(
postQ
-
postLoad
));
}
}
}
}
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