Package com.linkedin.helix.monitoring.mbeans

Examples of com.linkedin.helix.monitoring.mbeans.ClusterStatusMonitor


      }
      else
      {
        if (_clusterStatusMonitor == null)
        {
          _clusterStatusMonitor = new ClusterStatusMonitor(manager.getClusterName());
        }
       
        event.addAttribute("clusterStatusMonitor", _clusterStatusMonitor);
      }
    }
View Full Code Here


            // }
          }
        }
      }
      // Update cluster status monitor mbean
      ClusterStatusMonitor clusterStatusMonitor =
          (ClusterStatusMonitor) event.getAttribute("clusterStatusMonitor");
      if (clusterStatusMonitor != null)
      {
        clusterStatusMonitor.onExternalViewChange(view,
                                                  cache._idealStateMap.get(view.getResourceName()));
      }
     
      // compare the new external view with current one, set only on different
      Map<String, ExternalView> curExtViews =
View Full Code Here

            // }
          }
        }
      }
      // Update cluster status monitor mbean
      ClusterStatusMonitor clusterStatusMonitor =
          (ClusterStatusMonitor) event.getAttribute("clusterStatusMonitor");
      if (clusterStatusMonitor != null)
      {
        clusterStatusMonitor.onExternalViewChange(view,
                                                  cache._idealStateMap.get(view.getResourceName()));
      }
     
      // compare the new external view with current one, set only on different
      Map<String, ExternalView> curExtViews =
View Full Code Here

      throw new StageException("HelixManager attribute value is null");
    }
    HelixDataAccessor dataAccessor = manager.getHelixDataAccessor();
    _cache.refresh(dataAccessor);
   
    ClusterStatusMonitor clusterStatusMonitor = (ClusterStatusMonitor) event.getAttribute("clusterStatusMonitor");
    if(clusterStatusMonitor != null)
    {
      int disabledInstances = 0;
      int disabledPartitions = 0;
      for(InstanceConfig  config : _cache._instanceConfigMap.values())
      {
        if(config.getInstanceEnabled() == false)
        {
          disabledInstances ++;
        }
        if(config.getDisabledPartitionMap() != null)
        {
          disabledPartitions += config.getDisabledPartitionMap().size();
        }
      }
      clusterStatusMonitor.setClusterStatusCounters(_cache._liveInstanceMap.size(), _cache._instanceConfigMap.size(),
          disabledInstances, disabledPartitions);
    }

    event.addAttribute("ClusterDataCache", _cache);
   
View Full Code Here

      }
      else
      {
        if (_clusterStatusMonitor == null)
        {
          _clusterStatusMonitor = new ClusterStatusMonitor(manager.getClusterName());
        }
       
        if (_msgQueueMonitor == null)
        {
          _msgQueueMonitor = new HelixMessageQueueMonitor(manager.getClusterName());
View Full Code Here

    List<ZNRecord> externalViews = new ArrayList<ZNRecord>();
    externalViews.add(externalView);
    externalViews.add(externalView2);

    ClusterStatusMonitor monitor = new ClusterStatusMonitor("cluster1");
    MockHelixManager manager = new MockHelixManager();
    NotificationContext context = new NotificationContext(manager);
    System.out.println("END TestClusterStatusMonitor at" + new Date(System.currentTimeMillis()));
  }
View Full Code Here

TOP

Related Classes of com.linkedin.helix.monitoring.mbeans.ClusterStatusMonitor

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.