org.rocksdb.Options.setWalDir()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中org.rocksdb.Options.setWalDir()方法的一些代码示例,展示了Options.setWalDir()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Options.setWalDir()方法的具体详情如下:
包路径:org.rocksdb.Options
类名称:Options
方法名:setWalDir

Options.setWalDir介绍

暂无

代码示例

代码示例来源:origin: hugegraph/hugegraph

public RocksDBStdSessions(HugeConfig config, String dataPath,
             String walPath, String database, String store)
             throws RocksDBException {
  super(database, store);
  this.conf = config;
  // Init options
  Options options = new Options();
  RocksDBStdSessions.initOptions(this.conf, options, options, options);
  options.setWalDir(walPath);
  /*
   * Open RocksDB at the first time
   * Don't merge old CFs, we expect a clear DB when using this one
   */
  this.rocksdb = RocksDB.open(options, dataPath);
}

代码示例来源:origin: org.rocksdb/rocksdbjni

@Override
public Options setWalDir(final String walDir) {
 assert(isOwningHandle());
 setWalDir(nativeHandle_, walDir);
 return this;
}

代码示例来源:origin: com.baidu.hugegraph/hugegraph-rocksdb

public RocksDBStdSessions(HugeConfig config, String dataPath,
             String walPath, String database, String store)
             throws RocksDBException {
  super(database, store);
  this.conf = config;
  // Init options
  Options options = new Options();
  RocksDBStdSessions.initOptions(this.conf, options, options, options);
  options.setWalDir(walPath);
  /*
   * Open RocksDB at the first time
   * Don't merge old CFs, we expect a clear DB when using this one
   */
  this.rocksdb = RocksDB.open(options, dataPath);
}

代码示例来源:origin: pravega/pravega

private Options createDatabaseOptions() {
  BlockBasedTableConfig tableFormatConfig = new BlockBasedTableConfig()
      .setBlockSize(cacheBlockSizeKB * 1024L)
      .setBlockCacheSize(readCacheSizeMB * 1024L * 1024L)
      .setCacheIndexAndFilterBlocks(true);
  return new Options()
      .setCreateIfMissing(true)
      .setDbLogDir(Paths.get(this.dbDir, DB_LOG_DIR).toString())
      .setWalDir(Paths.get(this.dbDir, DB_WRITE_AHEAD_LOG_DIR).toString())
      .setWalTtlSeconds(0)
      .setWalSizeLimitMB(MAX_WRITE_AHEAD_LOG_SIZE_MB)
      .setWriteBufferSize(writeBufferSizeMB * 1024L * 1024L)
      .setMaxWriteBufferNumber(MAX_WRITE_BUFFER_NUMBER)
      .setMinWriteBufferNumberToMerge(MIN_WRITE_BUFFER_NUMBER_TO_MERGE)
      .setTableFormatConfig(tableFormatConfig)
      .setOptimizeFiltersForHits(true)
      .setUseDirectReads(true);
}

相关文章

Options类方法