Package org.xtreemfs.babudb.index.reader

Examples of org.xtreemfs.babudb.index.reader.DiskIndex.rangeLookup()


              index.writeIndex(DataGenerator.randomIterator(lookupHits, size, hitrate, minStrLen, maxStrLen, minChar, maxChar));
            }
        } else {
          //   populate the lookup-hits table
          DiskIndex diskIndexTmp = new DiskIndex(path, new DefaultByteRangeComparator(), compress, mmap);
          Iterator<Entry<byte[], byte[]>> itTmp = diskIndexTmp.rangeLookup(null, null, true);
          while(itTmp.hasNext()) {
                if(generator.nextInt() % hitrate == 0)
                  lookupHits.add(itTmp.next().getKey());
          }
          diskIndexTmp.destroy();
View Full Code Here


       
        while(warmups-- > 0) {
          int readEntries = 10000;         
          //   read the disk index
          DiskIndex diskIndex = new DiskIndex(path, new DefaultByteRangeComparator(), compress, mmap);
          Iterator<Entry<byte[], byte[]>> it = diskIndex.rangeLookup(null, null, true);
          while(it.hasNext() && readEntries-- > 0) it.next();
          diskIndex.destroy();
        }

      // clear caches...
View Full Code Here

      // run garbage collection to remove any existing mmap:ed pages
      Runtime.getRuntime().gc();
     
      //   read the disk index
      DiskIndex diskIndex = new DiskIndex(path, new DefaultByteRangeComparator(), compress, mmap);
      Iterator<Entry<byte[], byte[]>> it = diskIndex.rangeLookup(null, null, true);
   
      /* iterate over all data in the disk index to measure the prefix lookup throughput */
      long iterStart = System.currentTimeMillis();
      while(it.hasNext()) it.next();
      long iterTime = System.currentTimeMillis() - iterStart;
View Full Code Here

          int firstIndex = Math.abs(generator.nextInt()) % lookupHits.size();
         
          from = lookupHits.get(firstIndex);
          to = lookupHits.get(firstIndex + (Math.abs(generator.nextInt()) % (lookupHits.size() - firstIndex)));
         
            Iterator<Entry<byte[], byte[]>> tmpIt = diskIndex.rangeLookup(from, to, true);
           
            /* iterate over all data returned by the range scan */
            long scanStart = System.currentTimeMillis();
            while(tmpIt.hasNext()) tmpIt.next();
            scanTotal += System.currentTimeMillis() - scanStart;
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.