Examples of rangeLookup()


Examples of org.xtreemfs.babudb.api.database.Database.rangeLookup()

            ir.addInsert(1, (i + "").getBytes(), (i + "").getBytes());
            ir.addInsert(2, (i + "").getBytes(), (i + "").getBytes());
            db.insert(ir, null);
        }
       
        Iterator<Entry<byte[], byte[]>> it = db.rangeLookup(0, new byte[0], new byte[0], null).get();
        for (int i = 1000; i < 2000; i++)
            assertEquals(i + "", new String(it.next().getValue()));
        assertFalse(it.hasNext());
       
        it = db.rangeLookup(0, "1500".getBytes(), "1600".getBytes(), null).get();
View Full Code Here

Examples of org.xtreemfs.babudb.api.database.Database.rangeLookup()

        Iterator<Entry<byte[], byte[]>> it = db.rangeLookup(0, new byte[0], new byte[0], null).get();
        for (int i = 1000; i < 2000; i++)
            assertEquals(i + "", new String(it.next().getValue()));
        assertFalse(it.hasNext());
       
        it = db.rangeLookup(0, "1500".getBytes(), "1600".getBytes(), null).get();
        for (int i = 1500; i < 1600; i++)
            assertEquals(i + "", new String(it.next().getValue()));
        assertFalse(it.hasNext());
       
        database.getCheckpointer().checkpoint();
View Full Code Here

Examples of org.xtreemfs.babudb.api.database.Database.rangeLookup()

            assertEquals(i + "", new String(it.next().getValue()));
        assertFalse(it.hasNext());
       
        database.getCheckpointer().checkpoint();
       
        it = db.rangeLookup(0, "1500".getBytes(), "1600".getBytes(), null).get();
        for (int i = 1500; i < 1600; i++)
            assertEquals(i + "", new String(it.next().getValue()));
        assertFalse(it.hasNext());
       
        database.shutdown();
View Full Code Here

Examples of org.xtreemfs.babudb.index.LSMTree.rangeLookup()

        }
       
        // peform range lookups
       
        // current tree, ascending
        Iterator<Entry<byte[], byte[]>> it = tree.rangeLookup(new byte[0], new byte[0], true);
        Iterator<byte[]> itExpected = map3.values().iterator();
        while (it.hasNext())
            assertEquals(itExpected.next(), it.next().getValue());
        assertFalse(itExpected.hasNext());
       
View Full Code Here

Examples of org.xtreemfs.babudb.index.LSMTree.rangeLookup()

        while (it.hasNext())
            assertEquals(itExpected.next(), it.next().getValue());
        assertFalse(itExpected.hasNext());
       
        // current tree, descending
        it = tree.rangeLookup(new byte[0], new byte[0], false);
        itExpected = map3.descendingMap().values().iterator();
        while (it.hasNext())
            assertEquals(itExpected.next(), it.next().getValue());
        assertFalse(itExpected.hasNext());
       
View Full Code Here

Examples of org.xtreemfs.babudb.index.LSMTree.rangeLookup()

        while (it.hasNext())
            assertEquals(itExpected.next(), it.next().getValue());
        assertFalse(itExpected.hasNext());
       
        // snapshot 2, ascending
        it = tree.rangeLookup(new byte[0], new byte[0], snap2, true);
        itExpected = map2.values().iterator();
        while (it.hasNext())
            assertEquals(itExpected.next(), it.next().getValue());
        assertFalse(itExpected.hasNext());
       
View Full Code Here

Examples of org.xtreemfs.babudb.index.LSMTree.rangeLookup()

        while (it.hasNext())
            assertEquals(itExpected.next(), it.next().getValue());
        assertFalse(itExpected.hasNext());
       
        // snapshot 2, descending
        it = tree.rangeLookup(new byte[0], new byte[0], snap2, false);
        itExpected = map2.descendingMap().values().iterator();
        while (it.hasNext())
            assertEquals(itExpected.next(), it.next().getValue());
        assertFalse(itExpected.hasNext());
       
View Full Code Here

Examples of org.xtreemfs.babudb.index.LSMTree.rangeLookup()

        while (it.hasNext())
            assertEquals(itExpected.next(), it.next().getValue());
        assertFalse(itExpected.hasNext());
       
        // snapshot 1, ascending
        it = tree.rangeLookup(new byte[0], new byte[0], snap1, true);
        itExpected = map1.values().iterator();
        while (it.hasNext())
            assertEquals(itExpected.next(), it.next().getValue());
        assertFalse(itExpected.hasNext());
       
View Full Code Here

Examples of org.xtreemfs.babudb.index.LSMTree.rangeLookup()

        while (it.hasNext())
            assertEquals(itExpected.next(), it.next().getValue());
        assertFalse(itExpected.hasNext());
       
        // snapshot 1, descending
        it = tree.rangeLookup(new byte[0], new byte[0], snap1, false);
        itExpected = map1.descendingMap().values().iterator();
        while (it.hasNext())
            assertEquals(itExpected.next(), it.next().getValue());
        assertFalse(itExpected.hasNext());
       
View Full Code Here

Examples of org.xtreemfs.babudb.index.LSMTree.rangeLookup()

        while (it.hasNext())
            assertEquals(itExpected.next(), it.next().getValue());
        assertFalse(itExpected.hasNext());
       
        // real range lookup, current tree, ascending
        it = tree.rangeLookup("2".getBytes(), "5".getBytes(), true);
        itExpected = map3.subMap("2".getBytes(), "5".getBytes()).values().iterator();
        while (it.hasNext())
            assertEquals(itExpected.next(), it.next().getValue());
        assertFalse(itExpected.hasNext());
       
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.