Skip to content

Commit

Permalink
Fix rdbms benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
rayokota committed Mar 7, 2021
1 parent b58f234 commit a254bc5
Showing 1 changed file with 9 additions and 1 deletion.
Expand Up @@ -38,6 +38,8 @@
import io.kcache.utils.PersistentCache;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import org.agrona.MutableDirectBuffer;
import org.agrona.concurrent.UnsafeBuffer;
Expand Down Expand Up @@ -172,7 +174,13 @@ private PersistentCache<byte[], byte[]> createCache(String cacheType) {
case MAPDB:
return new MapDBCache<>(name, dataDir, serde, serde, null);
case RDBMS:
return new RdbmsCache<>(name, dataDir, serde, serde, null);
PersistentCache<byte[], byte[]> cache =
new RdbmsCache<>(name, dataDir, serde, serde, null);
Map<String, Object> configs = new HashMap<>();
configs.put(RdbmsCache.JDBC_URL_CONFIG, "jdbc:derby:" + dataDir + "/kcache;create=true");
configs.put(RdbmsCache.DIALECT_CONFIG, "DERBY");
cache.configure(configs);
return cache;
case ROCKSDB:
return new RocksDBCache<>(name, dataDir, serde, serde, null);
default:
Expand Down

0 comments on commit a254bc5

Please sign in to comment.