Package org.xtreemfs.babudb.api.database

Examples of org.xtreemfs.babudb.api.database.DatabaseInsertGroup.addInsert()


        DatabaseInsertGroup ir = db.createInsertGroup();
        ir.addInsert(0, "testxyz".getBytes(), "v1".getBytes());
        ir.addInsert(0, "test".getBytes(), "v2".getBytes());
        ir.addInsert(0, "yagga".getBytes(), "bla".getBytes());
        ir.addInsert(1, "foo".getBytes(), "v1".getBytes());
        ir.addInsert(1, "bar".getBytes(), "v2".getBytes());
        db.insert(ir, null).get();
       
        // create a snapshot
        database.getSnapshotManager().createPersistentSnapshot("test",
            new DefaultSnapshotConfig("snap1", new int[] { 0, 3 }, null, null));
View Full Code Here


        } catch (Exception exc) {
            // ok
        }
       
        ir = db.createInsertGroup();
        ir.addInsert(0, "testxyz".getBytes(), "ggg".getBytes());
        ir.addInsert(0, "test".getBytes(), "ggg".getBytes());
        db.insert(ir, null).get();
       
        // restart the database w/o checkpointing
        database.shutdown();
View Full Code Here

            // ok
        }
       
        ir = db.createInsertGroup();
        ir.addInsert(0, "testxyz".getBytes(), "ggg".getBytes());
        ir.addInsert(0, "test".getBytes(), "ggg".getBytes());
        db.insert(ir, null).get();
       
        // restart the database w/o checkpointing
        database.shutdown();
        database = BabuDBFactory.createBabuDB(new BabuDBConfig(baseDir, baseDir, 1, 0, 0,
View Full Code Here

                for (int i = 0; i < numInGroup; i++) {
                    final int index = getRandomIndex();
                    final String key = getRandomDictEntry();
                    final String value = getRandomDictEntry();
//                    controlIndices[index].put(key, value);
                    ig.addInsert(index, key.getBytes(), value.getBytes());
                }
               
                db.insert(ig, null).get();
               
                numInsGroup++;
View Full Code Here

            final int numInGroup = (int) Math.round(Math.random() * 9) + 1;
            final DatabaseInsertGroup ig = db.createInsertGroup();
            for (int i = 0; i < numInGroup; i++) {
                final byte[] key = generateData(30);
                final byte[] value = generateData(10000);
                ig.addInsert((int) (Math.random() * 5), key, value);
                dbSize += key.length + value.length;
            }
           
            db.insert(ig, null).get();
           
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.