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

Conversation

deeps1991
Copy link
Contributor

TPCCBenchmark assumes the presence of the file
config/geopartitioned_workload.xml. If the benchmark
is run from a directory that does not have the above file,
it causes the benchmark to fail with FileNotFoundException.

Instead, if no file is specified as part of the command line
options, the benchmark should just assume that geopartitioning
is disabled.

This patch introduces changes for the above fix.
Tested by running TPCC --create for both nonpartitioned and
partitioned setups with and without the file present.

config/geopartitioned_workload.xml. If the benchmark
is run from a directory that does not have the above file,
it causes the benchmark to fail with FileNotFoundException.

Instead, if no file is specified as part of the command line
options, the benchmark should just assume that geopartitioning
is disabled.

This patch introduces changes for the above fix.
Tested by running TPCC --create for both nonpartitioned and
partitioned setups with and without the file present.
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants