PlainTable is a RocksDB's SST file format optimized for low query latency on pure-memory or really low-latency media.
It also support prefix hash feature.
19202122232425262728
public static final RocksMemoryResource rocksMemoryResource = new RocksMemoryResource(); @Test public void keySize() { PlainTableConfig plainTableConfig = new PlainTableConfig(); plainTableConfig.setKeySize(5); assertThat(plainTableConfig.keySize()). isEqualTo(5); }
27282930313233343536
isEqualTo(5); } @Test public void bloomBitsPerKey() { PlainTableConfig plainTableConfig = new PlainTableConfig(); plainTableConfig.setBloomBitsPerKey(11); assertThat(plainTableConfig.bloomBitsPerKey()). isEqualTo(11); }
35363738394041424344
isEqualTo(11); } @Test public void hashTableRatio() { PlainTableConfig plainTableConfig = new PlainTableConfig(); plainTableConfig.setHashTableRatio(0.95); assertThat(plainTableConfig.hashTableRatio()). isEqualTo(0.95); }
43444546474849505152
isEqualTo(0.95); } @Test public void indexSparseness() { PlainTableConfig plainTableConfig = new PlainTableConfig(); plainTableConfig.setIndexSparseness(18); assertThat(plainTableConfig.indexSparseness()). isEqualTo(18); }
51525354555657585960
isEqualTo(18); } @Test public void hugePageTlbSize() { PlainTableConfig plainTableConfig = new PlainTableConfig(); plainTableConfig.setHugePageTlbSize(1); assertThat(plainTableConfig.hugePageTlbSize()). isEqualTo(1); }
59606162636465666768
isEqualTo(1); } @Test public void encodingType() { PlainTableConfig plainTableConfig = new PlainTableConfig(); plainTableConfig.setEncodingType(EncodingType.kPrefix); assertThat(plainTableConfig.encodingType()).isEqualTo( EncodingType.kPrefix); }
6768697071727374
EncodingType.kPrefix); } @Test public void fullScanMode() { PlainTableConfig plainTableConfig = new PlainTableConfig(); plainTableConfig.setFullScanMode(true); assertThat(plainTableConfig.fullScanMode()).isTrue(); }
73747576777879808182
plainTableConfig.setFullScanMode(true); assertThat(plainTableConfig.fullScanMode()).isTrue(); } @Test public void storeIndexInFile() { PlainTableConfig plainTableConfig = new PlainTableConfig(); plainTableConfig.setStoreIndexInFile(true); assertThat(plainTableConfig.storeIndexInFile()). isTrue(); }
8485868788899091929394
@Test public void plainTableConfig() { Options opt = null; try { opt = new Options(); PlainTableConfig plainTableConfig = new PlainTableConfig(); opt.setTableFormatConfig(plainTableConfig); assertThat(opt.tableFactoryName()).isEqualTo("PlainTable"); } finally { if (opt != null) { opt.dispose();