Examples of linkToSnapshot()


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

            // snapshot; this is done to ensure that old checkpoints are
            // properly cleaned up, and the database remains in a consistent
            // state
            IOException exception = null;
            try {
                tree.linkToSnapshot(databaseDir + File.separator
                    + getSnapshotFilename(index, viewId, sequenceNo));
            } catch (ClosedByInterruptException exc) {
                Logging.logError(Logging.LEVEL_DEBUG, this, exc);
            } catch (IOException exc) {
                Logging.logError(Logging.LEVEL_ERROR, this, exc);
View Full Code Here

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

            tree.insert(k.getBytes(), value);
       
        int snapId = tree.createSnapshot();
        tree.materializeSnapshot(SNAP_FILE, snapId, 0, new DefaultSnapshotConfig("blub", new int[] { 0 },
            new byte[][][] { { "a".getBytes(), "bl".getBytes(), "zwum".getBytes() } }, null));
        tree.linkToSnapshot(SNAP_FILE);
       
        assertEquals(value, tree.lookup("a".getBytes()));
        assertEquals(null, tree.lookup("v".getBytes()));
        assertEquals(value, tree.lookup("blub".getBytes()));
        assertEquals(value, tree.lookup("blubber".getBytes()));
View Full Code Here

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

        assertEquals(new String(map.firstKey()), new String(tree.firstEntry().getKey()));
       
        // create, materialize and link a new snapshot
        int snapId = tree.createSnapshot();
        tree.materializeSnapshot(SNAP_FILE, snapId);
        tree.linkToSnapshot(SNAP_FILE);
       
        for (byte[] key : map.keySet())
            assertEquals(new String(map.get(key)), new String(tree.lookup(key)));
        assertEquals(new String(map.firstKey()), new String(tree.firstEntry().getKey()));
       
View Full Code Here

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

        assertEquals(map.size(), count);
       
        // create, materialize and link a new snapshot
        snapId = tree.createSnapshot();
        tree.materializeSnapshot(SNAP_FILE2, snapId);
        tree.linkToSnapshot(SNAP_FILE2);
       
        for (byte[] key : map.keySet())
            assertEquals(new String(map.get(key)), new String(tree.lookup(key)));
        assertEquals(new String(map.firstKey()), new String(tree.firstEntry().getKey()));
       
View Full Code Here

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

        assertFalse(tree.prefixLookup(new byte[0]).hasNext());
       
        // create, materialize and link a new snapshot
        snapId = tree.createSnapshot();
        tree.materializeSnapshot(SNAP_FILE3, snapId);
        tree.linkToSnapshot(SNAP_FILE3);
       
        it = tree.prefixLookup(new byte[0]);
        assertFalse(it.hasNext());
       
        tree.insert("test".getBytes(), "test".getBytes());
View Full Code Here

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

        tree.insert("test".getBytes(), "test".getBytes());
        tree.delete("test".getBytes());
       
        snapId = tree.createSnapshot();
        tree.materializeSnapshot(SNAP_FILE4, snapId);
        tree.linkToSnapshot(SNAP_FILE4);
       
        assertEquals(null, tree.lookup("test".getBytes()));
       
        tree.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.