Skip to content

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.
@deeps1991 deeps1991 requested a review from hbhanawat September 2, 2021 22:32
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.

2 participants