String bdbDir = args[0];
String storeName = args[1];
String serverProperties = args[2];
VoldemortConfig config = new VoldemortConfig(new Props(new File(serverProperties)));
EnvironmentConfig environmentConfig = new EnvironmentConfig();
environmentConfig.setDurability(Durability.COMMIT_NO_SYNC);
environmentConfig.setAllowCreate(true);
environmentConfig.setTransactional(config.isBdbWriteTransactionsEnabled());
Environment environment = new Environment(new File(bdbDir), environmentConfig);
DatabaseConfig databaseConfig = new DatabaseConfig();
databaseConfig.setAllowCreate(true);
databaseConfig.setTransactional(config.isBdbWriteTransactionsEnabled());
databaseConfig.setSortedDuplicates(false);
Database database = environment.openDatabase(null, storeName, databaseConfig);
StorageEngine<ByteArray, byte[], byte[]> store = null;
if(config.getBdbPrefixKeysWithPartitionId()) {
store = new PartitionPrefixedBdbStorageEngine(storeName,
environment,
database,
new BdbRuntimeConfig(),
TestUtils.makeSingleNodeRoutingStrategy());