Examples of Mupd8DataPair


Examples of com.walmartlabs.mupd8.application.Mupd8DataPair

        assertTrue("HasNext should not consume data",kafkaSource.hasNext());
    }

    public void testNext() {
        assertTrue("HasNext should return true when data", kafkaSource.hasNext());
        Mupd8DataPair mupd8DataPair = kafkaSource.getNextDataPair();
        assertEquals("Next should return the correct message",val,mupd8DataPair._key.toString());
        produceNonJsonMessage();
        mupd8DataPair = kafkaSource.getNextDataPair();
        assertEquals("Next should return the next correct message",val, new String(mupd8DataPair._value));
        assertNull("Next should return the null val for missing key", mupd8DataPair._key);
View Full Code Here

Examples of com.walmartlabs.mupd8.application.Mupd8DataPair

    @Override
    public Mupd8DataPair getNextDataPair() {
         try {
            byte[] msg = consumerIterator.next().message();
            Mupd8DataPair ret = new Mupd8DataPair();
            ret._value = msg;
            ret._key = getValue(key,msg);
            return ret;
         } catch (Exception e) {
            LOG.error("Exception in getting next value from consumer stream", e);
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.