private long getServerMaxOffset(String serverUrl, final String topic,String partition) {
final List<Long> serverMaxOffsetList = new ArrayList<Long>();
// String key=partition+"_"+topic;
final String partitionId = partition.substring(partition.indexOf("-")+1, partition.length());
MsgSender msgSender = this.coreManager.getSender(serverUrl);
// final String brokerId = partition.substring(0,partition.indexOf("-"));
StatsResult ret = msgSender.getStats("offsets", 5000);
if (ret.isSuccess()) {
try {
Utils.processEachLine(ret.getStatsInfo(), new Action() {
@Override
public void process(String line) {