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) {