Package com.alibaba.jstorm.cluster

Examples of com.alibaba.jstorm.cluster.StormMonitor


    return result;
  }
 
  public static void updateMetricMonitorStatus(StormClusterState clusterState,
      String topologyId, boolean isEnable) throws Exception {
    StormMonitor stormMonitor = new StormMonitor(isEnable);
    clusterState.set_storm_monitor(topologyId, stormMonitor);
  }
View Full Code Here


    String topologyId = event.getTopologyId();
    try {
      Map<Object, Object> conf = nimbusData.getConf();
      boolean isEnable =  ConfigExtension.isEnablePerformanceMetrics(conf);
      StormClusterState zkClusterState = nimbusData.getStormClusterState();
      StormMonitor monitor = new StormMonitor(isEnable);
      zkClusterState.set_storm_monitor(topologyId, monitor);
    } catch (Exception e) {
      LOG.warn("Failed to update metrics monitor status of " + topologyId, e);
    }
  }
View Full Code Here

   
    try {
        List<String> topologys = cluster.active_storms();
       
        for (String topologyId : topologys) {
          StormMonitor monitor = null;
          boolean metricPerf = true;
          Assignment assignment = null;
         
          try {
              monitor = cluster.get_storm_monitor(topologyId);
              if (monitor != null) metricPerf = monitor.getMetrics();
         
              assignment = cluster.assignment_info(topologyId, null);
          } catch (Exception e) {
            LOG.error("Error when retrieving monitor status and assignment info "
                + "for " + topologyId, e);
View Full Code Here

      }

      // Start metrics report if metrics monitor is enabled.
      // Stop metrics report if metrics monitor is disabled.
      try {
          StormMonitor monitor = zkCluster.get_storm_monitor(topologyId);
          if (null != monitor) {
              boolean newMetricsMonitor = monitor.getMetrics();
              MetricReporter metricReporter = workerData.getMetricsReporter();
              boolean oldMetricsMonitor = metricReporter.isEnable();
         
              if (oldMetricsMonitor != newMetricsMonitor) {
                  metricReporter.setEnable(newMetricsMonitor);
View Full Code Here

TOP

Related Classes of com.alibaba.jstorm.cluster.StormMonitor

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.