Package com.taobao.metamorphosis.tools.monitor.core

Examples of com.taobao.metamorphosis.tools.monitor.core.StatsResult


    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) {
                        String[] tmp = StringUtils.splitByWholeSeparator(line, " ");
                        if (tmp != null && tmp.length == 7) {
                            if(topic.equals(tmp[0])&&partitionId.equals(tmp[2])){
View Full Code Here


        cancelFutures(this.futures);
    }


    private void probOnce(MsgSender sender) throws InterruptedException {
        StatsResult statsResult = sender.getStats("realtime", this.getMonitorConfig().getSendTimeout());
        if (statsResult.isSuccess()) {
            try {
                this.processStatsInfo(statsResult);
            }
            catch (Exception e) {
                logger.warn("process realtime stats info error. string:" + statsResult.getStatsInfo(), e);
            }
        }
        else {
            logger.warn("get realtime stats fail.serverUrl:" + statsResult.getServerUrl(), statsResult.getException());
        }
    }
View Full Code Here

TOP

Related Classes of com.taobao.metamorphosis.tools.monitor.core.StatsResult

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.