use of com.baidu.hugegraph.backend.store.rocksdb.OpenedRocksDB.CFHandle in project incubator-hugegraph by apache.
the class RocksDBStdSessions method openRocksDB.
private static OpenedRocksDB openRocksDB(HugeConfig config, String dataPath, String walPath) throws RocksDBException {
// Init options
Options options = new Options();
RocksDBStdSessions.initOptions(config, options, options, options, options);
options.setWalDir(walPath);
SstFileManager sstFileManager = new SstFileManager(Env.getDefault());
options.setSstFileManager(sstFileManager);
/*
* Open RocksDB at the first time
* Don't merge old CFs, we expect a clear DB when using this one
*/
RocksDB rocksdb = RocksDB.open(options, dataPath);
Map<String, CFHandle> cfs = new ConcurrentHashMap<>();
return new OpenedRocksDB(rocksdb, cfs, sstFileManager);
}
Aggregations