Package org.xtreemfs.babudb.index.reader

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


        assertFalse(it.hasNext());
       
        it = diskIndex.rangeLookup("b".getBytes(), "x".getBytes(), false);
        assertFalse(it.hasNext());
       
        diskIndex.destroy();
    }
   
    public void testLargeScalePrefixLookup() throws Exception {
       
        // initialize a map w/ random strings
View Full Code Here


                assertEquals(mapKey, indexKey);
                assertEquals(mapValue, indexValue);
            }
        }
       
        diskIndex.destroy();
       
    }
   
    public void testLargeScaleDescendingPrefixLookup() throws Exception {
       
View Full Code Here

                assertEquals(mapKey, indexKey);
                assertEquals(mapValue, indexValue);
            }
        }
       
        diskIndex.destroy();
       
    }
   
    private static String createRandomString(int minLength, int maxLength) {
       
View Full Code Here

          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();
        }
       
        // do a warm-up phase to trick the JVM
        int warmups = 5;
       
View Full Code Here

          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...
      Runtime.getRuntime().exec("/bin/sync");
      Runtime.getRuntime().exec("/bin/echo 3 > /proc/sys/vm/drop_caches");
View Full Code Here

        System.out.print((int) Math.ceil(((double) lookups / (((double) sumLookups) / 1000.0))) + ", ");
        System.out.print((int) Math.ceil((double) iterTime) + ", ");
        // entries/s (scan throughput)
        System.out.println((int) Math.ceil(((double) size / (((double) iterTime) / 1000.0))));
       
        diskIndex.destroy();
    }       
}
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.