Examples of BPlusTree


Examples of com.hp.hpl.jena.tdb.index.bplustree.BPlusTree

           
            RangeIndex rIndex = IndexFactory.openBPT(loc, indexName,
                                                     SystemTDB.BlockReadCacheSize,
                                                     SystemTDB.BlockWriteCacheSize,
                                                     keyLength, valueLength) ;
            BPlusTree bpt = (BPlusTree)rIndex ;
           
            if ( false )
            {
                System.out.println("---- Index structure") ;
                bpt.dump() ;
            }
            if ( true )
            {
                System.out.println("---- Index contents") ;
                Iterator<Record> iter = bpt.iterator() ;
                if ( ! iter.hasNext() )
                    System.out.println("<<Empty>>") ;
               
                for ( ; iter.hasNext() ; )
                {
                    Record r = iter.next();
                    printRecord("", System.out, r, keyUnitLen) ;
                }
            }
           
            // Check.
            Iterator<Record> iterCheck = bpt.iterator() ;
            Record r1 = null ;
            int i = 0 ;
            for ( ; iterCheck.hasNext() ; )
            {
                Record r2 = iterCheck.next();
View Full Code Here

Examples of com.hp.hpl.jena.tdb.index.bplustree.BPlusTree

        BlockMgr blkMgrNodes = BlockMgrFactory.create(destination, Names.bptExtTree, blockSizeNodes, readCacheSize, writeCacheSize) ;
        BlockMgr blkMgrRecords = BlockMgrFactory.create(destination, Names.bptExtRecords, blockSizeRecords, readCacheSize, writeCacheSize) ;
       
        int rowBlock = 1000 ;
        Iterator<Record> iter = new RecordsFromInput(input, tupleLength, colMap, rowBlock) ;
        BPlusTree bpt2 = BPlusTreeRewriter.packIntoBPlusTree(iter, bptParams, recordFactory, blkMgrNodes, blkMgrRecords) ;
        bpt2.close() ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.tdb.index.bplustree.BPlusTree

            int writeCacheSize = 100 ;
            FileSet destination = new FileSet(dsg.getLocation(), Names.indexNode2Id) ;
            BlockMgr blkMgrNodes = BlockMgrFactory.create(destination, Names.bptExtTree, SystemTDB.BlockSize, readCacheSize, writeCacheSize) ;
            BlockMgr blkMgrRecords = BlockMgrFactory.create(destination, Names.bptExtRecords, SystemTDB.BlockSize, readCacheSize, writeCacheSize) ;
            Iterator<Record> iter2 = Iter.iter(sdb03.iterator()).map(transformPair2Record) ;
            BPlusTree bpt2 = BPlusTreeRewriter.packIntoBPlusTree(iter2, bptParams, recordFactory, blkMgrNodes, blkMgrRecords) ;
            bpt2.sync() ;

            ProgressLogger.print ( log, monitor03 ) ;
        } finally {
            sdb03.close() ;
            sdb03 = null ;
View Full Code Here

Examples of com.hp.hpl.jena.tdb.index.bplustree.BPlusTree

    @Override
    protected RangeIndexMaker makeRangeIndexMaker()
    {
        BPlusTreeMaker maker = new BPlusTreeMaker(order, order, trackingBlocks) ;
       
        BPlusTree bpt = (BPlusTree)(maker.makeIndex()) ;
        BPlusTreeParams param = bpt.getParams() ;
        System.out.println(bpt.getParams()) ;
        System.out.println("Block size = "+bpt.getParams().getCalcBlockSize()) ;
        return maker ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.tdb.index.bplustree.BPlusTree

    public Index makeIndex() { return makeRangeIndex() ; }

    @Override
    public RangeIndex makeRangeIndex()
    {
        BPlusTree bpTree = BPlusTree.makeMem(order, recordOrder, RecordLib.TestRecordLength, 0) ;
        if ( trackers )
            bpTree = BPlusTree.addTracking(bpTree) ;
//        System.err.println("CheckingNode = "+BPlusTreeParams.CheckingNode) ;
//        System.err.println("CheckingTree = "+BPlusTreeParams.CheckingTree) ;
        return bpTree ;
View Full Code Here

Examples of com.hp.hpl.jena.tdb.index.bplustree.BPlusTree

public class TestTransIterator extends BaseTest
{
    static BPlusTree build(int order, int[] values)
    {
        // See TestBPlusTree
        BPlusTree bpt = BPlusTree.makeMem(order, order, RecordLib.TestRecordLength, 0) ;
        bpt = BPlusTree.addTracking(bpt) ;
        IndexTestLib.add(bpt, values) ;
        return bpt ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.tdb.index.bplustree.BPlusTree

public class TestTransIterator extends BaseTest
{
    static BPlusTree build(int order, int[] values)
    {
        // See TestBPlusTree
        BPlusTree bpt = BPlusTree.makeMem(order, order, RecordLib.TestRecordLength, 0) ;
        bpt = BPlusTree.addTracking(bpt) ;
        IndexTestLib.add(bpt, values) ;
        return bpt ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.tdb.index.bplustree.BPlusTree

        BlockMgr blkMgrNodes = BlockMgrFactory.create(destination, Names.bptExtTree, blockSizeNodes, readCacheSize, writeCacheSize) ;
        BlockMgr blkMgrRecords = BlockMgrFactory.create(destination, Names.bptExtRecords, blockSizeRecords, readCacheSize, writeCacheSize) ;
       
        int rowBlock = 1000 ;
        Iterator<Record> iter = new RecordsFromInput(input, tupleLength, colMap, rowBlock) ;
        BPlusTree bpt2 = BPlusTreeRewriter.packIntoBPlusTree(iter, bptParams, recordFactory, blkMgrNodes, blkMgrRecords) ;
        bpt2.close() ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.tdb.index.bplustree.BPlusTree

        // Node table and input data using node ids (rather than RDF node values)
        Sink<Quad> sink = new NodeTableBuilder2(dsg, monitorTotal, outputTriples, outputQuads) ;
        Sink<Triple> sink2 = new SinkExtendTriplesToQuads(sink) ;

        // Build primary indexes: SPO and GSPO
        BPlusTree bptSPO = null ;
        BPlusTree bptGSPO = null ;
        try {
            for( String filename : datafiles)
            {
                if ( datafiles.size() > 0 )
                    cmdLog.info("Load: "+filename+" -- "+Utils.nowAsString()) ;
View Full Code Here

Examples of com.hp.hpl.jena.tdb.index.bplustree.BPlusTree

        monitor.tick() ;
        return record ;
      }
        };
       
        BPlusTree bpt2 ;
        Iterator<Tuple<Long>> it = tuples.iterator() ;
        Iterator<Record> iter = null ;
        try {
            iter = Iter.iter(it).map(transformTuple2Record) ;
            bpt2 = BPlusTreeRewriter.packIntoBPlusTree(iter, bptParams, recordFactory, blkMgrNodes, blkMgrRecords) ;
            bpt2.sync() ;
        } finally {
            Iter.close(it) ;
            Iter.close(iter) ;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.