Examples of RangeIndex


Examples of com.cetsoft.imcache.cache.search.index.RangeIndex

    if (type == IndexType.UNIQUE_HASH) {
      indexes.put(attributeName, new UniqueHashIndex());
    } else if (type == IndexType.NON_UNIQUE_HASH) {
      indexes.put(attributeName, new NonUniqueHashIndex());
    } else if (type == IndexType.RANGE_INDEX) {
      indexes.put(attributeName, new RangeIndex());
    }
  }
View Full Code Here

Examples of com.cetsoft.imcache.cache.search.index.RangeIndex

    }
    else if(type==IndexType.NON_UNIQUE_HASH){
      indexes.put(attributeName, new NonUniqueHashIndex());
    }
    else if(type==IndexType.RANGE_INDEX){
      indexes.put(attributeName, new RangeIndex());
    }
  }
View Full Code Here

Examples of com.hp.hpl.jena.tdb.index.RangeIndex

       
        if ( false )
        {
            // Dump raw
            TupleIndexRecord tir = (TupleIndexRecord)idx ;
            RangeIndex rIdx = tir.getRangeIndex() ;
            Iterator<Record> rIter = rIdx.iterator() ;
            while(rIter.hasNext())
                System.out.println(rIter.next()) ;
        }
    }
View Full Code Here

Examples of com.hp.hpl.jena.tdb.index.RangeIndex

            int keyUnitLen = indexName.length() ;
            int keyLength = keySubLen*keyUnitLen ;
            int valueLength = 0 ;
           
           
            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();
                i++ ;
               
                if ( r1 != null )
                {
                    if ( ! Record.keyLT(r1, r2) )
                    {
                        System.err.println("key error@ "+i) ;
                        printRecord("  ", System.err, r1, keyUnitLen) ;
                        printRecord("  ", System.err, r2, keyUnitLen) ;
                    }
                }
                r1 = r2 ;
            }
           
            if ( false )
            {
                // Dump in tuple order.
                TupleIndex tupleIndex = new TupleIndexRecord(primary.length(), new ColumnMap(primary, indexName), indexName, rIndex.getRecordFactory(), rIndex) ;
                if ( true )
                {
                    System.out.println("---- Tuple contents") ;
                    Iterator<Tuple<NodeId>> iter2 = tupleIndex.all() ;
                    if ( ! iter2.hasNext() )
View Full Code Here

Examples of com.hp.hpl.jena.tdb.index.RangeIndex

            index2.close() ;
        }
        else
        {
            // BPT -> BPT copy with reordering (hardcoded)
            RangeIndex index1 = IndexFactory.openBPT(location1, indexName1, 10, 10, keyLength, valueLength)
            // Unlikely to be metafile for destination.
            keyLength = index1.getRecordFactory().keyLength() ;
            valueLength = index1.getRecordFactory().valueLength() ;
            RangeIndex index2 = IndexFactory.openBPT(location2, indexName2, 10000, 10000, keyLength, valueLength) ;
            bptCopy(index1, index2, label) ;
            index1.close() ;
            index2.close() ;
        }
    }
View Full Code Here

Examples of com.hp.hpl.jena.tdb.index.RangeIndex

       
        if ( false )
        {
            // Dump raw
            TupleIndexRecord tir = (TupleIndexRecord)idx ;
            RangeIndex rIdx = tir.getRangeIndex() ;
            Iterator<Record> rIter = rIdx.iterator() ;
            while(rIter.hasNext())
                System.out.println(rIter.next()) ;
        }
    }
View Full Code Here

Examples of com.hp.hpl.jena.tdb.index.RangeIndex

        BlockMgr blkMgrNodes ;
        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 ;
View Full Code Here

Examples of com.hp.hpl.jena.tdb.index.RangeIndex

               
        }
        // Problems with spotting the index technology.
        FileSet fileset = null ; //FileSet.fromFilename(filename) ;
       
        RangeIndex rIndex = IndexBuilder.createRangeIndex(fileset, rf) ;
        return new TupleIndexRecord(desc.length(), new ColumnMap(primary, desc), desc, rf, rIndex) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.tdb.index.RangeIndex

        FileSet fs = new FileSet(location, indexName) ;
        int readCacheSize = params.readCacheSize ;
        int writeCacheSize = params.writeCacheSize ;
       
        // Value part is null (zero length)
        RangeIndex rIndex = makeRangeIndex(location, indexName, keyLength, 0, readCacheSize, writeCacheSize) ;
        TupleIndex tupleIndex = new TupleIndexRecord(primary.length(), new ColumnMap(primary, indexOrder), indexOrder, rIndex.getRecordFactory(), rIndex) ;
        return tupleIndex ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.tdb.index.RangeIndex

    public static RangeIndex makeRangeIndex(Location location, String indexName,
                                             int dftKeyLength, int dftValueLength,
                                             int readCacheSize,int writeCacheSize)
    {
         FileSet fs = new FileSet(location, indexName) ;
         RangeIndex rIndex =  makeBPlusTree(fs, readCacheSize, writeCacheSize, dftKeyLength, dftValueLength) ;
         return rIndex ;
    }
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.