Package com.alibaba.jstorm.metric

Examples of com.alibaba.jstorm.metric.JStormHistogram


              String remoteAddr = sockAddr.getHostName() + ":" + sockAddr.getPort();
           
              long interval = System.currentTimeMillis() - timeStamp;
              if (interval < 0) interval = 0;

              JStormHistogram netTransTime = networkTransmitTimeMap.get(remoteAddr);
              if (netTransTime == null) {
                netTransTime = Metrics.registerHistograms(remoteAddr, MetricDef.NETWORK_MSG_TRANS_TIME,
                    null, Metrics.MetricType.WORKER);
                networkTransmitTimeMap.put(remoteAddr, netTransTime);
              }
             
              netTransTime.update(interval);
          }
         
          return ctrl_msg;
        }
View Full Code Here


    return ret;
  }
 
  public JStormHistogram registerHistogram(String name, MetricCallback<Histogram> callback) {
    String userMetricName = getMetricName(taskid, name);
        JStormHistogram ret = Metrics.registerHistograms(userMetricName);
        Metrics.registerUserDefine(userMetricName, ret, callback);   
    return ret;
  }
View Full Code Here

TOP

Related Classes of com.alibaba.jstorm.metric.JStormHistogram

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.