Search in sources :

Example 71 with Record

use of org.apache.jena.dboe.base.record.Record in project jena by apache.

the class TestBPlusTreeRewriterNonTxn method scanComparision.

public static void scanComparision(List<Record> originaldata, BPlusTree bpt2) {
    // ** Scan comparisonSetupIndex
    Iterator<Record> iter1 = originaldata.iterator();
    Iterator<Record> iter2 = bpt2.iterator();
    long count = 0;
    for (; iter1.hasNext(); ) {
        count++;
        Record r1 = iter1.next();
        if (!iter2.hasNext())
            error("Deviation: new B+Tree is smaller");
        Record r2 = iter2.next();
        if (!Record.equals(r1, r2))
            error("Deviation in iteration record %d: %s : %s", count, r1, r2);
    }
    if (iter2.hasNext())
        error("New B+Tree larger than original");
}
Also used : Record(org.apache.jena.dboe.base.record.Record)

Aggregations

Record (org.apache.jena.dboe.base.record.Record)71 RecordLib.intToRecord (org.apache.jena.dboe.test.RecordLib.intToRecord)6 Pair (org.apache.jena.atlas.lib.Pair)5 NoSuchElementException (java.util.NoSuchElementException)3 BufferChannel (org.apache.jena.dboe.base.file.BufferChannel)3 FileSet (org.apache.jena.dboe.base.file.FileSet)3 RecordBufferPage (org.apache.jena.dboe.base.recordbuffer.RecordBufferPage)3 BPTreeNode (org.apache.jena.dboe.trans.bplustree.BPTreeNode)3 BPlusTree (org.apache.jena.dboe.trans.bplustree.BPlusTree)3 BPlusTreeParams (org.apache.jena.dboe.trans.bplustree.BPlusTreeParams)3 NodeId (org.apache.jena.tdb2.store.NodeId)3 Test (org.junit.Test)3 ArrayList (java.util.ArrayList)2 StorageException (org.apache.jena.dboe.base.StorageException)2 BlockMgr (org.apache.jena.dboe.base.block.BlockMgr)2 RecordBuffer (org.apache.jena.dboe.base.buffer.RecordBuffer)2 RecordFactory (org.apache.jena.dboe.base.record.RecordFactory)2 Index (org.apache.jena.dboe.index.Index)2 RangeIndex (org.apache.jena.dboe.index.RangeIndex)2 TDBException (org.apache.jena.tdb2.TDBException)2