Package com.netflix.suro.input.thrift

Examples of com.netflix.suro.input.thrift.MessageSetProcessor.process()


        assertEquals(queue.getQueueSize(), 0);
        assertEquals(queue.getStatus(), ServiceStatus.ALIVE);

        TMessageSet messageSet = TestConnectionPool.createMessageSet(100);
        assertEquals(queue.process(messageSet).getResultCode(), ResultCode.OK);

        assertEquals(queue.getQueueSize(), 1);
        assertEquals(queue.poll(1, TimeUnit.MILLISECONDS), messageSet);
        assertEquals(queue.getQueueSize(), 0);
View Full Code Here


        assertEquals(queue.getQueueSize(), 1);
        assertEquals(queue.poll(1, TimeUnit.MILLISECONDS), messageSet);
        assertEquals(queue.getQueueSize(), 0);

        queue.stopTakingTraffic();
        assertEquals(queue.process(messageSet).getResultCode(), ResultCode.OTHER_ERROR);

        queue.startTakingTraffic();
        assertEquals(queue.getStatus(), ServiceStatus.ALIVE);

        assertEquals(queue.process(messageSet).getResultCode(), ResultCode.OK);
View Full Code Here

        assertEquals(queue.process(messageSet).getResultCode(), ResultCode.OTHER_ERROR);

        queue.startTakingTraffic();
        assertEquals(queue.getStatus(), ServiceStatus.ALIVE);

        assertEquals(queue.process(messageSet).getResultCode(), ResultCode.OK);

        injector.getInstance(LifecycleManager.class).close();
    }
}
View Full Code Here

        for (int i = 0; i < 10; ++i) {
            builder.withMessage("topic1", Integer.toString(i).getBytes());
        }
        // sink1: 10
        // default: 10
        queue.process(builder.build());

        for (int i = 0; i < 5; ++i) {
            builder.withMessage("topic2", Integer.toString(i).getBytes());
        }
        // sink1: 5
View Full Code Here

        for (int i = 0; i < 5; ++i) {
            builder.withMessage("topic2", Integer.toString(i).getBytes());
        }
        // sink1: 5
        queue.process(builder.build());

        for (int i = 0; i < 15; ++i) {
            builder.withMessage("topic3", Integer.toString(i).getBytes());
        }
        queue.process(builder.build());
View Full Code Here

        queue.process(builder.build());

        for (int i = 0; i < 15; ++i) {
            builder.withMessage("topic3", Integer.toString(i).getBytes());
        }
        queue.process(builder.build());
        // sink3: 15 with topic3_alias

        for (int i = 0; i < 20; ++i) {
            builder.withMessage("topic4", Integer.toString(i).getBytes());
        }
View Full Code Here

        for (int i = 0; i < 20; ++i) {
            builder.withMessage("topic4", Integer.toString(i).getBytes());
        }
        // default: 20
        queue.process(builder.build());

        // total sink1: 15, default: 30
        int count = 10;
        while (!answer() && count > 0) {
            Thread.sleep(1000);
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.