Fix Java Break Related to memtable bloom bits to size ratio change

Summary: Need to change several more places for the change to fix Java tests

Test Plan:
make jtest
under java, run "make db_bench"

Reviewers: yhchiang, andrewkr, IslamAbdelRahman

Reviewed By: IslamAbdelRahman

Subscribers: leveldb, andrewkr, dhruba

Differential Revision: https://reviews.facebook.net/D59541
main
sdong 9 years ago
parent 6faddd7c55
commit 2a79af1c54
  1. 9
      java/benchmark/src/main/java/org/rocksdb/benchmark/DbBenchmark.java
  2. 5
      java/src/main/java/org/rocksdb/ColumnFamilyOptions.java

@ -569,8 +569,7 @@ public class DbBenchmark {
(Integer)flags_.get(Flag.bloom_locality)); (Integer)flags_.get(Flag.bloom_locality));
options.setMinWriteBufferNumberToMerge( options.setMinWriteBufferNumberToMerge(
(Integer)flags_.get(Flag.min_write_buffer_number_to_merge)); (Integer)flags_.get(Flag.min_write_buffer_number_to_merge));
options.setMemtablePrefixBloomBits( options.setMemtablePrefixBloomSizeRatio((Double) flags_.get(Flag.memtable_bloom_size_ratio));
(Integer)flags_.get(Flag.memtable_bloom_bits));
options.setNumLevels( options.setNumLevels(
(Integer)flags_.get(Flag.num_levels)); (Integer)flags_.get(Flag.num_levels));
options.setTargetFileSizeBase( options.setTargetFileSizeBase(
@ -1195,10 +1194,10 @@ public class DbBenchmark {
return Integer.parseInt(value); return Integer.parseInt(value);
} }
}, },
memtable_bloom_bits(0,"Bloom filter bits per key for memtable.\n" + memtable_bloom_size_ratio(0, "Ratio of memtable used by the bloom filter.\n"
"\tNegative means no bloom filter.") { + "\t0 means no bloom filter.") {
@Override public Object parseValue(String value) { @Override public Object parseValue(String value) {
return Integer.parseInt(value); return Double.parseDouble(value);
} }
}, },
cache_numshardbits(-1,"Number of shards for the block cache\n" + cache_numshardbits(-1,"Number of shards for the block cache\n" +

@ -591,7 +591,7 @@ public class ColumnFamilyOptions extends RocksObject
@Override @Override
public ColumnFamilyOptions setMemtablePrefixBloomSizeRatio( public ColumnFamilyOptions setMemtablePrefixBloomSizeRatio(
final double memtablePrefixBloomSizeRatio) { final double memtablePrefixBloomSizeRatio) {
setMemtablePrefixBloomBits(nativeHandle_, memtablePrefixBloomSizeRatio); setMemtablePrefixBloomSizeRatio(nativeHandle_, memtablePrefixBloomSizeRatio);
return this; return this;
} }
@ -775,7 +775,8 @@ public class ColumnFamilyOptions extends RocksObject
long handle, long inplaceUpdateNumLocks) long handle, long inplaceUpdateNumLocks)
throws IllegalArgumentException; throws IllegalArgumentException;
private native long inplaceUpdateNumLocks(long handle); private native long inplaceUpdateNumLocks(long handle);
private native void setMemtablePrefixBloomBits(long handle, double memtablePrefixBloomSizeRatio); private native void setMemtablePrefixBloomSizeRatio(
long handle, double memtablePrefixBloomSizeRatio);
private native double memtablePrefixBloomSizeRatio(long handle); private native double memtablePrefixBloomSizeRatio(long handle);
private native void setBloomLocality( private native void setBloomLocality(
long handle, int bloomLocality); long handle, int bloomLocality);

Loading…
Cancel
Save