Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency of non partitioned TPCC run on file config/geopartitioned_workload.xml #119

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/com/oltpbenchmark/CommandLineOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class CommandLineOptions {
"gpc",
"geopartitioned-config",
true,
"GeoPartitioning configuration file [default: config/geopartitioned_workload.xml]");
"GeoPartitioning configuration file");

COMMAND_LINE_OPTS.addOption("im", "interval-monitor", true,
"Throughput Monitoring Interval in milliseconds");
Expand Down
11 changes: 7 additions & 4 deletions src/com/oltpbenchmark/DBWorkload.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,14 @@ public static void main(String[] args) throws Exception {
// BEGIN LOADING WORKLOAD CONFIGURATION
// ----------------------------------------------------------------

String geopartitionedConfigFile = options.getGeoPartitionedConfigFile().orElse("config/geopartitioned_workload.xml");
GeoPartitionedConfigFileOptions geopartitionedConfigOptions = new GeoPartitionedConfigFileOptions(geopartitionedConfigFile);
GeoPartitionPolicy geoPartitionPolicy = geopartitionedConfigOptions.getGeoPartitionPlacement(totalWarehousesAcrossShards, numWarehouses, startWarehouseIdForShard);

String geopartitionedConfigFile = options.getGeoPartitionedConfigFile().orElse("");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep this code as is for the cases when the default file is available. We can rather do a file exists check for the geopartitionedConfigFile variable.

GeoPartitionPolicy geoPartitionPolicy = null;
if (!geopartitionedConfigFile.isEmpty()) {
GeoPartitionedConfigFileOptions geopartitionedConfigOptions = new GeoPartitionedConfigFileOptions(geopartitionedConfigFile);
geoPartitionPolicy = geopartitionedConfigOptions.getGeoPartitionPlacement(totalWarehousesAcrossShards, numWarehouses, startWarehouseIdForShard);
}
WorkloadConfiguration wrkld = new WorkloadConfiguration(geoPartitionPolicy);

wrkld.setBenchmarkName(plugin);

// Pull in database configuration
Expand Down