Package com.taobao.metamorphosis.gregor.master.SamsaMasterBroker

Examples of com.taobao.metamorphosis.gregor.master.SamsaMasterBroker.OffsetInfo


                        consumersPath + "/" + consumerId + consumerIndex + "/offsets/" + topic + "/" + brokerId + "-"
                                + msgInfo.partition;
                assertTrue(zkClient.exists(offsetPath));
                final String dataStr = ZkUtils.readDataMaybeNull(zkClient, offsetPath);
                assertNotNull(dataStr);
                final OffsetInfo offsetInfo = SamsaMasterBroker.readOffsetInfo(offsetPath, dataStr);
                System.out.println(msgInfo + "    " + dataStr);
                assertEquals(msgInfo.msgId, offsetInfo.msgId);
                assertEquals(msgInfo.offset, offsetInfo.offset);
            }
            // ȷ�ϵ��������ƫ��0
            final String offsetPath = consumersPath + "/" + consumerId + "/offsets/" + topic + "/" + brokerId + "-" + 4;
            assertTrue(zkClient.exists(offsetPath));
            final String dataStr = ZkUtils.readDataMaybeNull(zkClient, offsetPath);
            assertNotNull(dataStr);
            final OffsetInfo offsetInfo = SamsaMasterBroker.readOffsetInfo(offsetPath, dataStr);
            assertEquals(-1, offsetInfo.msgId);
            assertEquals(0, offsetInfo.offset);
        }
        finally {
            if (metaBroker != null) {
View Full Code Here

TOP

Related Classes of com.taobao.metamorphosis.gregor.master.SamsaMasterBroker.OffsetInfo

Copyright © 2018 www.massapicom. 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.