Package com.hp.hpl.jena.tdb.base.file

Examples of com.hp.hpl.jena.tdb.base.file.FileSet


    private DatasetPrefixesTDB(IndexBuilder indexBuilder, Location location, DatasetControl policy)
    {
        // TO BE REMOVED when DI sorted out.
        // This is a table "G" "P" "U" (Graph, Prefix, URI), indexed on GPU only.
        // GPU index
        FileSet filesetGPU = null ;
        if ( location != null )
            filesetGPU = new FileSet(location, Names.indexPrefix) ;
       
        TupleIndex index = new TupleIndexRecord(3, colMap, Names.primaryIndexPrefix, factory, indexBuilder.newRangeIndex(filesetGPU, factory)) ;
        TupleIndex[] indexes = { index } ;
       
        // Node table.
        FileSet filesetNodeTableIdx = null ;
        if ( location != null )
            filesetNodeTableIdx = new FileSet(location, Names.prefixNode2Id) ;
       
        FileSet filesetNodeTable = null ;
        if ( location != null )
            filesetNodeTable = new FileSet(location, Names.prefixId2Node) ;
       
        NodeTable nodes = NodeTableFactory.create(indexBuilder, filesetNodeTable, filesetNodeTableIdx, -1, -1, -1) ;
        nodeTupleTable = new NodeTupleTableConcrete(3, indexes, nodes, policy) ;
    }
View Full Code Here


        BPlusTreeParams bptParams = new BPlusTreeParams(order, recordFactory) ;
       
        int readCacheSize = 10 ;
        int writeCacheSize = 100 ;
       
        FileSet destination = new FileSet(location, indexName) ;
        BlockMgr blkMgrNodes = BlockMgrFactory.create(destination, Names.bptExtTree, SystemTDB.BlockSize, readCacheSize, writeCacheSize) ;
        BlockMgr blkMgrRecords = BlockMgrFactory.create(destination, Names.bptExtRecords, SystemTDB.BlockSize, readCacheSize, writeCacheSize) ;
       
        cmdLog.info("Index: creating " + indexName + " index...") ;
        final ProgressLogger monitor = new ProgressLogger(cmdLog, "records to " + indexName, BulkLoader.DataTickPoint,BulkLoader.superTick) ;
View Full Code Here

            System.err.println("Destination contains an index of that name") ;
            System.exit(1) ;
        }
       
        // To current directory ....
        FileSet destination = new FileSet(dstLoc, indexName) ;
        // Check existance
       
//        FileOps.deleteSilent(destination.filename(Names.bptExt1)) ;
//        FileOps.deleteSilent(destination.filename(Names.bptExt2)) ;
        //FileSet destination = new FileSet(Location.mem(), destIndex) ;
View Full Code Here

        BPlusTreeParams bptParams = new BPlusTreeParams(order, recordFactory) ;

        int blockSizeNodes = blockSize ;
        int blockSizeRecords = blockSize ;

        FileSet destination = new FileSet(location, indexName) ;

        BlockMgr blkMgrNodes = BlockMgrFactory.create(destination, Names.bptExtTree, blockSizeNodes, readCacheSize, writeCacheSize) ;
        BlockMgr blkMgrRecords = BlockMgrFactory.create(destination, Names.bptExtRecords, blockSizeRecords, readCacheSize, writeCacheSize) ;
       
        int rowBlock = 1000 ;
View Full Code Here

        return tupleIndex ;
    }

    public static RangeIndex openBPT(Location location, String indexName, int readCacheSize, int writeCacheSize, int dftKeyLength, int dftValueLength)
    {
        FileSet fileset = new FileSet(location, indexName) ;
        return SetupTDB.makeBPlusTree(fileset, readCacheSize, writeCacheSize, dftKeyLength, dftValueLength) ;
    }
View Full Code Here

        this.dsg = dsg ;
        this.monitor = monitor ;
        this.log = monitor.getLogger() ;

        String filename = new FileSet(dsg.getLocation(), Names.indexId2Node).filename(Names.extNodeData) ;
        this.objects = FileFactory.createObjectFileDisk(filename) ;
       
        this.outputTriples = outputTriples ;
        this.outputQuads = outputQuads ;
        this.stats = new StatsCollectorNodeId() ;
View Full Code Here

            int order = BPlusTreeParams.calcOrder(SystemTDB.BlockSize, recordFactory) ;
            BPlusTreeParams bptParams = new BPlusTreeParams(order, recordFactory) ;
            int readCacheSize = 10 ;
            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() ;
View Full Code Here

    }

    private static TupleIndex createTupleIndex(IndexBuilder indexBuilder, RecordFactory recordFactory, Location location, String primary, String desc)
    {
        // Map name of index to name of file.
        FileSet fileset = new FileSet(location, desc) ;
        RangeIndex rIdx1 = indexBuilder.newRangeIndex(fileset, recordFactory) ;
        TupleIndex tupleIndex = new TupleIndexRecord(desc.length(), new ColumnMap(primary, desc), desc, recordFactory, rIdx1) ;
        return tupleIndex ;
    }
View Full Code Here

    }
   
    @Override
    protected ObjectFile createObjectFile()
    {
        FileSet fs = new FileSet(loc, "data") ;
        return SetupTDB.makeObjectFile(fs) ;
    }
View Full Code Here

        BPlusTreeRewriter.debug = debug ;

        // ---- Test data
        List<Record> originaldata = TestBPlusTreeRewriter.createData(N, recordFactory) ;

        FileSet destination = FileSet.mem() ;
        // ---- Rewrite
        // Write leaves to ...
        BlockMgr blkMgr1 = BlockMgrFactory.create(destination, Names.bptExtTree, bptParams.getCalcBlockSize(), 10, 10) ;
        // Write nodes to ...
        BlockMgr blkMgr2 = BlockMgrFactory.create(destination, Names.bptExtTree, bptParams.getCalcBlockSize(), 10, 10) ;
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.tdb.base.file.FileSet

Copyright © 2018 www.massapicom. 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.