Package org.voltcore.utils.DBBPool

Examples of org.voltcore.utils.DBBPool.BBContainer.b()


                                          new SnapshotPredicates(-1).toBytes());
        sourceEngine.activateTableStream( STOCK_TABLEID, TableStreamType.RECOVERY, Long.MAX_VALUE,
                                          new SnapshotPredicates(-1).toBytes());

        final BBContainer origin = DBBPool.allocateDirect(1024 * 1024 * 2);
        origin.b().clear();
        final BBContainer container = new BBContainer(origin.b()){

            @Override
            public void discard() {
                checkDoubleFree();
View Full Code Here


            output.add(container);
            int serialized = sourceEngine.tableStreamSerializeMore(WAREHOUSE_TABLEID,
                                                                   TableStreamType.RECOVERY,
                                                                   output).getSecond()[0];
            assertTrue(serialized > 0);
            container.b().limit(serialized);
            destinationEngine.get().processRecoveryMessage( container.b(), container.address() );


            serialized = sourceEngine.tableStreamSerializeMore(WAREHOUSE_TABLEID,
                                                               TableStreamType.RECOVERY,
View Full Code Here

            int serialized = sourceEngine.tableStreamSerializeMore(WAREHOUSE_TABLEID,
                                                                   TableStreamType.RECOVERY,
                                                                   output).getSecond()[0];
            assertTrue(serialized > 0);
            container.b().limit(serialized);
            destinationEngine.get().processRecoveryMessage( container.b(), container.address() );


            serialized = sourceEngine.tableStreamSerializeMore(WAREHOUSE_TABLEID,
                                                               TableStreamType.RECOVERY,
                                                               output).getSecond()[0];
View Full Code Here

            serialized = sourceEngine.tableStreamSerializeMore(WAREHOUSE_TABLEID,
                                                               TableStreamType.RECOVERY,
                                                               output).getSecond()[0];
            assertEquals( 5, serialized);
            assertEquals( RecoveryMessageType.Complete.ordinal(), container.b().get());

            assertEquals( sourceEngine.tableHashCode(WAREHOUSE_TABLEID), destinationEngine.get().tableHashCode(WAREHOUSE_TABLEID));

            container.b().clear();
            serialized = sourceEngine.tableStreamSerializeMore(STOCK_TABLEID,
View Full Code Here

            assertEquals( 5, serialized);
            assertEquals( RecoveryMessageType.Complete.ordinal(), container.b().get());

            assertEquals( sourceEngine.tableHashCode(WAREHOUSE_TABLEID), destinationEngine.get().tableHashCode(WAREHOUSE_TABLEID));

            container.b().clear();
            serialized = sourceEngine.tableStreamSerializeMore(STOCK_TABLEID,
                                                               TableStreamType.RECOVERY,
                                                               output).getSecond()[0];
            assertTrue(serialized > 0);
            container.b().limit(serialized);
View Full Code Here

            container.b().clear();
            serialized = sourceEngine.tableStreamSerializeMore(STOCK_TABLEID,
                                                               TableStreamType.RECOVERY,
                                                               output).getSecond()[0];
            assertTrue(serialized > 0);
            container.b().limit(serialized);
            destinationEngine.get().processRecoveryMessage( container.b(), container.address());


            serialized = sourceEngine.tableStreamSerializeMore(STOCK_TABLEID,
                                                               TableStreamType.RECOVERY,
View Full Code Here

            serialized = sourceEngine.tableStreamSerializeMore(STOCK_TABLEID,
                                                               TableStreamType.RECOVERY,
                                                               output).getSecond()[0];
            assertTrue(serialized > 0);
            container.b().limit(serialized);
            destinationEngine.get().processRecoveryMessage( container.b(), container.address());


            serialized = sourceEngine.tableStreamSerializeMore(STOCK_TABLEID,
                                                               TableStreamType.RECOVERY,
                                                               output).getSecond()[0];
View Full Code Here

            serialized = sourceEngine.tableStreamSerializeMore(STOCK_TABLEID,
                                                               TableStreamType.RECOVERY,
                                                               output).getSecond()[0];
            assertEquals( 5, serialized);
            assertEquals( RecoveryMessageType.Complete.ordinal(), container.b().get());
            assertEquals( STOCK_TABLEID, container.b().getInt());

            assertEquals( sourceEngine.tableHashCode(STOCK_TABLEID), destinationEngine.get().tableHashCode(STOCK_TABLEID));
        } finally {
            container.discard();
View Full Code Here

            serialized = sourceEngine.tableStreamSerializeMore(STOCK_TABLEID,
                                                               TableStreamType.RECOVERY,
                                                               output).getSecond()[0];
            assertEquals( 5, serialized);
            assertEquals( RecoveryMessageType.Complete.ordinal(), container.b().get());
            assertEquals( STOCK_TABLEID, container.b().getInt());

            assertEquals( sourceEngine.tableHashCode(STOCK_TABLEID), destinationEngine.get().tableHashCode(STOCK_TABLEID));
        } finally {
            container.discard();
        }
View Full Code Here

        // Build the index
        sourceEngine.activateTableStream(STOCK_TABLEID, TableStreamType.ELASTIC_INDEX, Long.MAX_VALUE, predicates.toBytes());

        // Humor serializeMore() by providing a buffer, even though it's not used.
        final BBContainer origin = DBBPool.allocateDirect(1024 * 1024 * 2);
        origin.b().clear();
        BBContainer container = new BBContainer(origin.b()){
            @Override
            public void discard() {
                checkDoubleFree();
                origin.discard();
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.