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

        BlockMgr blkMgrRecords ;
        int blockSize = SystemTDB.BlockSize ;
        Iterator<Record> iterator ;
       
        RangeIndex rangeIndex = SetupTDB.makeRangeIndex(srcLoc, indexName, dftKeyLength, dftValueLength, readCacheSize, writeCacheSize) ;
        BPlusTree bpt = (BPlusTree)rangeIndex ;
        bptParams = bpt.getParams() ;
        recordFactory = bpt.getRecordFactory() ;

        int blockSizeNodes = blockSize ;
        int blockSizeRecords = blockSize ;

        blkMgrNodes = BlockMgrFactory.create(destination, Names.bptExtTree, blockSizeNodes, readCacheSize, writeCacheSize) ;
        blkMgrRecords = BlockMgrFactory.create(destination, Names.bptExtRecords, blockSizeRecords, readCacheSize, writeCacheSize) ;

        iterator = bpt.iterator() ;
           
//            // Fakery.
//            blkMgrNodes = BlockMgrFactory.create(destination, Names.bptExt1, blockSize, readCacheSize, writeCacheSize) ;
//            blkMgrRecords = BlockMgrFactory.create(destination, Names.bptExt2, blockSize, readCacheSize, writeCacheSize) ;
//            recordFactory = new RecordFactory(dftKeyLength, dftValueLength) ;
//            bptParams = new BPlusTreeParams(3, recordFactory) ;
//            List<Record> data = TestBPlusTreeRewriter.createData(10, recordFactory) ;
//            iterator = data.iterator() ;
       
        //System.out.println("Rewrite: "+srcLoc+" "+indexName+" --> "+destination) ;
       
        BPlusTree bpt2 = BPlusTreeRewriter.packIntoBPlusTree(iterator,
                                                             bptParams, recordFactory,
                                                             blkMgrNodes, blkMgrRecords) ;
        if ( bpt2 == null )
            return ;
//       
//        Iterator<Record> iter = bpt2.iterator() ;
//        for ( ; iter.hasNext() ; )
//        {
//            Record r = iter.next() ;
//            System.out.println(r) ;
//        }

        bpt2.close() ;
    }
View Full Code Here

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

        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

           
            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

        // 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

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

        BlockMgr blkMgrRecords ;
        int blockSize = SystemTDB.BlockSize ;
        Iterator<Record> iterator ;
       
        RangeIndex rangeIndex = SetupTDB.makeRangeIndex(srcLoc, indexName, dftKeyLength, dftValueLength, readCacheSize, writeCacheSize) ;
        BPlusTree bpt = (BPlusTree)rangeIndex ;
        bptParams = bpt.getParams() ;
        recordFactory = bpt.getRecordFactory() ;

        int blockSizeNodes = blockSize ;
        int blockSizeRecords = blockSize ;

        blkMgrNodes = BlockMgrFactory.create(destination, Names.bptExtTree, blockSizeNodes, readCacheSize, writeCacheSize) ;
        blkMgrRecords = BlockMgrFactory.create(destination, Names.bptExtRecords, blockSizeRecords, readCacheSize, writeCacheSize) ;

        iterator = bpt.iterator() ;
           
//            // Fakery.
//            blkMgrNodes = BlockMgrFactory.create(destination, Names.bptExt1, blockSize, readCacheSize, writeCacheSize) ;
//            blkMgrRecords = BlockMgrFactory.create(destination, Names.bptExt2, blockSize, readCacheSize, writeCacheSize) ;
//            recordFactory = new RecordFactory(dftKeyLength, dftValueLength) ;
//            bptParams = new BPlusTreeParams(3, recordFactory) ;
//            List<Record> data = TestBPlusTreeRewriter.createData(10, recordFactory) ;
//            iterator = data.iterator() ;
       
        //System.out.println("Rewrite: "+srcLoc+" "+indexName+" --> "+destination) ;
       
        BPlusTree bpt2 = BPlusTreeRewriter.packIntoBPlusTree(iterator,
                                                             bptParams, recordFactory,
                                                             blkMgrNodes, blkMgrRecords) ;
        if ( bpt2 == null )
            return ;
//       
//        Iterator<Record> iter = bpt2.iterator() ;
//        for ( ; iter.hasNext() ; )
//        {
//            Record r = iter.next() ;
//            System.out.println(r) ;
//        }

        bpt2.close() ;
    }
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.