public void initDb(List<Integer> list) throws Exception { Options dbOptions = new Options().setCreateMissingColumnFamilies(true).setCreateIfMissing(true); initDb(list, dbOptions); }
public RocksDbCacheOperator(TopologyContext context, String cacheDir) { this.stormConf = context.getStormConf(); this.maxFlushSize = ConfigExtension.getTransactionCacheBatchFlushSize(stormConf); Options rocksDbOpt = new Options(); rocksDbOpt.setCreateMissingColumnFamilies(true).setCreateIfMissing(true); long bufferSize = ConfigExtension.getTransactionCacheBlockSize(stormConf) != null ? ConfigExtension.getTransactionCacheBlockSize(stormConf) : (1 * SizeUnit.GB); rocksDbOpt.setWriteBufferSize(bufferSize); int maxBufferNum = ConfigExtension.getTransactionMaxCacheBlockNum(stormConf) != null ? ConfigExtension.getTransactionMaxCacheBlockNum(stormConf) : 3; rocksDbOpt.setMaxWriteBufferNumber(maxBufferNum); // Config for log of RocksDb rocksDbOpt.setMaxLogFileSize(1073741824); // 1G rocksDbOpt.setKeepLogFileNum(1); rocksDbOpt.setInfoLogLevel(InfoLogLevel.WARN_LEVEL); try { Map<Object, Object> conf = new HashMap<Object, Object>(); conf.put(ROCKSDB_ROOT_DIR, cacheDir); conf.put(ROCKSDB_RESET, true); initDir(conf); initDb(null, rocksDbOpt); } catch (Exception e) { throw new RuntimeException(e); } kryo = new Kryo(); output = new Output(200, 2000000000); input = new Input(1); LOG.info("Finished rocksDb cache init: maxFlushSize={}, bufferSize={}, maxBufferNum={}", maxFlushSize, bufferSize, maxBufferNum); }
.optimizeLevelStyleCompaction() .setCreateIfMissing(true) .setCreateMissingColumnFamilies(true) .setIncreaseParallelism(rocksThreads) .setMaxBackgroundCompactions(rocksThreads)
try { Options options = new Options(); options.setCreateMissingColumnFamilies(true); options.setCreateIfMissing(true); options.setTargetFileSizeBase(fileSizeBase);
currentOptions = new Options(); currentOptions.setCreateIfMissing(true); currentOptions.setCreateMissingColumnFamilies(true); currentOptions.setMergeOperator(new StringAppendOperator());
@Override public Options setCreateMissingColumnFamilies(final boolean flag) { assert(isOwningHandle()); setCreateMissingColumnFamilies(nativeHandle_, flag); return this; }
public void initDb(List<Integer> list) throws Exception { Options dbOptions = new Options().setCreateMissingColumnFamilies(true).setCreateIfMissing(true); initDb(list, dbOptions); }
rocksDBOptions = new Options(dbOptions, cfOptions) .setCreateIfMissing(true) .setCreateMissingColumnFamilies(true) .optimizeLevelStyleCompaction(memtableSize) .setCompactionStyle(CompactionStyle.LEVEL)
rocksDbOpt.setCreateMissingColumnFamilies(true).setCreateIfMissing(true); long bufferSize = ConfigExtension.getTransactionCacheBlockSize(stormConf) != null ? ConfigExtension.getTransactionCacheBlockSize(stormConf) : (1 * SizeUnit.GB);
setAllowMmapWrites(true). setCreateIfMissing(true). setCreateMissingColumnFamilies(true); if (cacheSize > 0) { CompactionOptionsFIFO fifo = new CompactionOptionsFIFO();