Search in sources :

Example 6 with RecordBufferPageMgr

use of org.apache.jena.tdb.base.recordbuffer.RecordBufferPageMgr in project jena by apache.

the class TestBPTreeRecords method beforeClass.

@BeforeClass
public static void beforeClass() {
    oldNullOut = SystemTDB.NullOut;
    SystemTDB.NullOut = true;
    oldCheckingNode = BPlusTreeParams.CheckingNode;
    BPlusTreeParams.CheckingNode = true;
    oldCheckingBTree = BPlusTreeParams.CheckingTree;
    BPlusTreeParams.CheckingTree = true;
    // Which is 6 int records
    blockSize = 4 * 8;
    recordFactory = new RecordFactory(4, 0);
    bufSizeRecord = RecordBufferPage.calcRecordSize(recordFactory, blockSize);
    blkMgrRecords = BlockMgrFactory.createMem("BPTreeRecords", blockSize);
    recordBufferPageMgr = new RecordBufferPageMgr(recordFactory, blkMgrRecords);
    // B+Tree order does not matter.
    bPlusTree = BPlusTree.attach(new BPlusTreeParams(3, recordFactory), null, blkMgrRecords);
}
Also used : BPlusTreeParams(org.apache.jena.tdb.index.bplustree.BPlusTreeParams) RecordFactory(org.apache.jena.tdb.base.record.RecordFactory) RecordBufferPageMgr(org.apache.jena.tdb.base.recordbuffer.RecordBufferPageMgr) BeforeClass(org.junit.BeforeClass)

Aggregations

RecordBufferPageMgr (org.apache.jena.tdb.base.recordbuffer.RecordBufferPageMgr)6 BlockMgr (org.apache.jena.tdb.base.block.BlockMgr)3 RecordFactory (org.apache.jena.tdb.base.record.RecordFactory)3 RecordBufferPage (org.apache.jena.tdb.base.recordbuffer.RecordBufferPage)3 BaseTest (org.apache.jena.atlas.junit.BaseTest)2 Test (org.junit.Test)2 Iterator (java.util.Iterator)1 Function (java.util.function.Function)1 Iter (org.apache.jena.atlas.iterator.Iter)1 IteratorWithBuffer (org.apache.jena.atlas.iterator.IteratorWithBuffer)1 Pair (org.apache.jena.atlas.lib.Pair)1 PtrBuffer (org.apache.jena.tdb.base.buffer.PtrBuffer)1 RecordBuffer (org.apache.jena.tdb.base.buffer.RecordBuffer)1 Record (org.apache.jena.tdb.base.record.Record)1 BPlusTreeParams (org.apache.jena.tdb.index.bplustree.BPlusTreeParams)1 BPlusTreeRewriterUtils.divider (org.apache.jena.tdb.index.bplustree.BPlusTreeRewriterUtils.divider)1 BPlusTreeRewriterUtils.printIndexBlocks (org.apache.jena.tdb.index.bplustree.BPlusTreeRewriterUtils.printIndexBlocks)1 BPlusTreeRewriterUtils.summarizeDataBlocks (org.apache.jena.tdb.index.bplustree.BPlusTreeRewriterUtils.summarizeDataBlocks)1 BeforeClass (org.junit.BeforeClass)1 Logger (org.slf4j.Logger)1