mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-06 10:16:45 +00:00
[Java] Add Java support for cache sharding.
Summary: Add setCacheNumShardBits() and cacheNumShardBits() to Options. This allows developers to control the number of shards for the block cache. Test Plan: make rocksdbjava cd java make db_bench ./jdb_bench.sh --cache_size=1048576 --cache_numshardbits=6 Reviewers: sdong, ljin, ankgup87 Reviewed By: ankgup87 Subscribers: leveldb Differential Revision: https://reviews.facebook.net/D19347
This commit is contained in:
@@ -534,6 +534,8 @@ public class DbBenchmark {
|
||||
(Integer)flags_.get(Flag.max_background_flushes));
|
||||
options.setCacheSize(
|
||||
(Long)flags_.get(Flag.cache_size));
|
||||
options.setCacheNumShardBits(
|
||||
(Integer)flags_.get(Flag.cache_numshardbits));
|
||||
options.setBlockSize(
|
||||
(Long)flags_.get(Flag.block_size));
|
||||
options.setMaxOpenFiles(
|
||||
@@ -616,7 +618,6 @@ public class DbBenchmark {
|
||||
options.setCompressionLevel((Integer)flags_.get(Flag.compression_level));
|
||||
options.setMinLevelToCompress((Integer)flags_.get(Flag.min_level_to_compress));
|
||||
options.setHdfs((String)flags_.get(Flag.hdfs)); // env
|
||||
options.setCacheNumshardbits((Integer)flags_.get(Flag.cache_numshardbits));
|
||||
options.setStatistics((Boolean)flags_.get(Flag.statistics));
|
||||
options.setUniversalSizeRatio(
|
||||
(Integer)flags_.get(Flag.universal_size_ratio));
|
||||
|
||||
Reference in New Issue
Block a user