Examples of feed()


Examples of org.msgpack.unpacker.BufferUnpacker.feed()

        int n = 0;
        BufferUnpacker u = new MessagePack().createBufferUnpacker();
        UnpackerIterator it = u.iterator();

        for(int i=0; i < raw.length; i++) {
            u.feed(raw, i, 1);
            while(it.hasNext()) {
                Value v = it.next();
                assertEquals(vs.get(n), v);
                n++;
            }
View Full Code Here

Examples of org.msgpack.unpacker.BufferUnpacker.feed()

        int n = 0;
        BufferUnpacker u = new MessagePack().createBufferUnpacker();
        UnpackerIterator it = u.iterator();

        for(int i=0; i < raw.length; i+=11) {
            u.feed(raw, i, 11);
            while(it.hasNext()) {
                Value v = it.next();
                assertEquals(vs.get(n), v);
                n++;
            }
View Full Code Here

Examples of org.msgpack.unpacker.BufferUnpacker.feed()

            BufferPacker pk = new MessagePack().createBufferPacker();
            pk.write(v);
            byte[] raw = pk.toByteArray();
            //pk.reset();

            u.feed(raw, 0, raw.length);

            assertTrue(it.hasNext());
            Value ov = it.next();
            assertEquals(v, ov);
            //assertFalse(it.hasNext());
View Full Code Here

Examples of storm.trident.testing.FeederBatchSpout.feed()

        LocalCluster cluster = new LocalCluster();
        LocalDRPC drpc = new LocalDRPC();
        cluster.submitTopology("external_state_drpc", conf, externalState(drpc, testSpout));

        // You can use FeederBatchSpout to feed know values to the topology. Very useful for tests.
        testSpout.feed(fakeTweets.getNextTweetTuples("ted"));
        testSpout.feed(fakeTweets.getNextTweetTuples("ted"));
        testSpout.feed(fakeTweets.getNextTweetTuples("mary"));
        testSpout.feed(fakeTweets.getNextTweetTuples("jason"));

        System.out.println(drpc.execute("age_stats", ""));
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.