options.setCompressionType(CompressionType.LZ4_COMPRESSION); options.setBottommostCompressionType(CompressionType.ZSTD_COMPRESSION); options.setLevelCompactionDynamicLevelBytes(true);
public RocksDBLookupBuilder(TableDesc tableDesc, String[] keyColumns, String dbPath) { this.tableDesc = tableDesc; this.encoder = new RocksDBLookupRowEncoder(tableDesc, keyColumns); this.dbPath = dbPath; this.writeBatchSize = 500; this.options = new Options(); options.setCreateIfMissing(true).setWriteBufferSize(8 * SizeUnit.KB).setMaxWriteBufferNumber(3) .setMaxBackgroundCompactions(5).setCompressionType(CompressionType.SNAPPY_COMPRESSION) .setCompactionStyle(CompactionStyle.UNIVERSAL); }
@Override protected void init() throws FailStoreException { try { options = new Options(); options.setCreateIfMissing(true) .setWriteBufferSize(8 * SizeUnit.KB) .setMaxWriteBufferNumber(3) .setMaxBackgroundCompactions(10) .setCompressionType(CompressionType.SNAPPY_COMPRESSION) .setCompactionStyle(CompactionStyle.UNIVERSAL); Filter bloomFilter = new BloomFilter(10); BlockBasedTableConfig tableConfig = new BlockBasedTableConfig(); tableConfig.setBlockCacheSize(64 * SizeUnit.KB) .setFilter(bloomFilter) .setCacheNumShardBits(6) .setBlockSizeDeviation(5) .setBlockRestartInterval(10) .setCacheIndexAndFilterBlocks(true) .setHashIndexAllowCollision(false) .setBlockCacheCompressedSize(64 * SizeUnit.KB) .setBlockCacheCompressedNumShardBits(10); options.setTableFormatConfig(tableConfig); } catch (Exception e) { throw new FailStoreException(e); } }
@Override protected void init() throws FailStoreException { try { options = new Options(); options.setCreateIfMissing(true) .setWriteBufferSize(8 * SizeUnit.KB) .setMaxWriteBufferNumber(3) .setMaxBackgroundCompactions(10) .setCompressionType(CompressionType.SNAPPY_COMPRESSION) .setCompactionStyle(CompactionStyle.UNIVERSAL); Filter bloomFilter = new BloomFilter(10); BlockBasedTableConfig tableConfig = new BlockBasedTableConfig(); tableConfig.setBlockCacheSize(64 * SizeUnit.KB) .setFilter(bloomFilter) .setCacheNumShardBits(6) .setBlockSizeDeviation(5) .setBlockRestartInterval(10) .setCacheIndexAndFilterBlocks(true) .setHashIndexAllowCollision(false) .setBlockCacheCompressedSize(64 * SizeUnit.KB) .setBlockCacheCompressedNumShardBits(10); options.setTableFormatConfig(tableConfig); } catch (Exception e) { throw new FailStoreException(e); } }
@Override public Options setCompressionType(CompressionType compressionType) { setCompressionType(nativeHandle_, compressionType.getValue()); return this; }
options = new Options() .setCreateIfMissing(true) .setCompressionType(CompressionType.SNAPPY_COMPRESSION) .createStatistics(); rocksDB = RocksDB.open(options, fastaIndexFilePath.toString());
.setCompressionType(CompressionType.NO_COMPRESSION);
@Override public void setup(final BenchmarkParams b) throws IOException { super.setup(b); wkb = new UnsafeBuffer(new byte[keySize]); wvb = new UnsafeBuffer(new byte[valSize]); loadLibrary(); final Options options = new Options(); options.setCreateIfMissing(true); options.setCompressionType(NO_COMPRESSION); try { db = open(options, tmp.getAbsolutePath()); } catch (final RocksDBException ex) { throw new IOException(ex); } }
public RocksDBReader(StoreProperties props) { props.required(LOCATION); String location = props.get(LOCATION) + props.get(CACHE_NAME).replaceAll("[^a-zA-Z0-9-_\\.]", "_"); File f = new File(location); if (!f.exists() || !f.isDirectory()) throw new CacheException(String.format("Unable to read db directory '%s'", location)); Options options = new Options().setCreateIfMissing(false); String compressionType = props.get(COMPRESSION); if (compressionType != null) { options.setCompressionType(CompressionType.getCompressionType(compressionType)); } try { this.db = RocksDB.openReadOnly(options, location); } catch (RocksDBException e) { throw new CacheException(e); } this.marshaller = SerializationConfigUtil.getMarshaller(props); }
.setCompressionType(CompressionType.NO_COMPRESSION);
public RocksDBLookupBuilder(TableDesc tableDesc, String[] keyColumns, String dbPath) { this.tableDesc = tableDesc; this.encoder = new RocksDBLookupRowEncoder(tableDesc, keyColumns); this.dbPath = dbPath; this.writeBatchSize = 500; this.options = new Options(); options.setCreateIfMissing(true).setWriteBufferSize(8 * SizeUnit.KB).setMaxWriteBufferNumber(3) .setMaxBackgroundCompactions(5).setCompressionType(CompressionType.SNAPPY_COMPRESSION) .setCompactionStyle(CompactionStyle.UNIVERSAL); }
options.setTableFormatConfig(tableConfig); options.setWriteBufferSize(WRITE_BUFFER_SIZE); options.setCompressionType(COMPRESSION_TYPE); options.setCompactionStyle(COMPACTION_STYLE); options.setMaxWriteBufferNumber(MAX_WRITE_BUFFERS);
options.setCreateIfMissing(true); options.setCompactionStyle(CompactionStyle.LEVEL); options.setCompressionType(CompressionType.NO_COMPRESSION); options.setLevel0FileNumCompactionTrigger(8); options.setMaxBackgroundCompactions(2);
", overwriting to " + compressionType.name()); options.setCompressionType(compressionType);
", overwriting to " + compressionType.name()); options.setCompressionType(compressionType);
", overwriting to " + compressionType.name()); options.setCompressionType(compressionType);
@Override protected void init() throws FailStoreException { try { options = new Options(); options.setCreateIfMissing(true) .setWriteBufferSize(8 * SizeUnit.KB) .setMaxWriteBufferNumber(3) .setMaxBackgroundCompactions(10) .setCompressionType(CompressionType.SNAPPY_COMPRESSION) .setCompactionStyle(CompactionStyle.UNIVERSAL); Filter bloomFilter = new BloomFilter(10); BlockBasedTableConfig tableConfig = new BlockBasedTableConfig(); tableConfig.setBlockCacheSize(64 * SizeUnit.KB) .setFilter(bloomFilter) .setCacheNumShardBits(6) .setBlockSizeDeviation(5) .setBlockRestartInterval(10) .setCacheIndexAndFilterBlocks(true) .setHashIndexAllowCollision(false) .setBlockCacheCompressedSize(64 * SizeUnit.KB) .setBlockCacheCompressedNumShardBits(10); options.setTableFormatConfig(tableConfig); } catch (Exception e) { throw new FailStoreException(e); } }
options.setCompressionType(CompressionType.LZ4_COMPRESSION);