Package org.apache.helix.healthcheck.TestWildcardAlert

Examples of org.apache.helix.healthcheck.TestWildcardAlert.TestClusterMBeanObserver.refresh()


    beanCollection.setAlerts(originAlert1, alertResultMap1, clusterName);
    beanCollection.setAlerts(originAlert2, alertResultMap2, clusterName);
   
    beanCollection.refreshAlertDelta(clusterName);
    String summaryKey = ClusterAlertMBeanCollection.ALERT_SUMMARY + "_" + clusterName;
    jmxMBeanObserver.refresh();
   
    // Get the history list
    String beanName = "HelixAlerts:alert=" + summaryKey;
    Map<String, Object> beanValueMap = jmxMBeanObserver._beanValueMap.get(beanName);
    String history1 = (String) (beanValueMap.get("AlertFiredHistory"));
View Full Code Here


      alertResultMap1.put(alertName, valueAndStatus);
    }
   
    beanCollection.setAlerts(originAlert1, alertResultMap1, clusterName);
    beanCollection.refreshAlertDelta(clusterName);
    jmxMBeanObserver.refresh();

    beanValueMap = jmxMBeanObserver._beanValueMap.get(beanName);
    history1 = (String) (beanValueMap.get("AlertFiredHistory"));
   
    sr = new StringReader(history1);
View Full Code Here

    beanCollection.setAlerts(originAlert1, alertResultMap1, clusterName);
    beanCollection.setAlerts(originAlert2, alertResultMap2, clusterName);
   
    beanCollection.refreshAlertDelta(clusterName);
    String summaryKey = ClusterAlertMBeanCollection.ALERT_SUMMARY + "_" + clusterName;
    jmxMBeanObserver.refresh();
   
    Assert.assertEquals(jmxMBeanObserver._beanValueMap.size(), nAlerts2 + nAlerts1 + 1);
   
    Thread.sleep(300);
   
View Full Code Here

   
    for(int i = 0; i < 20; i++)
    {
      Thread.sleep(500);
     
      jmxMBeanObserver.refresh();
     
      if(jmxMBeanObserver._beanValueMap.size() == nAlerts1 + 1)
      {
        break;
      }
View Full Code Here

    beanCollection.setAlerts(originAlert1, alertResultMap1, clusterName);
    beanCollection.setAlerts(originAlert2, alertResultMap2, clusterName);

    beanCollection.refreshAlertDelta(clusterName);
    String summaryKey = ClusterAlertMBeanCollection.ALERT_SUMMARY + "_" + clusterName;
    jmxMBeanObserver.refresh();

    // Get the history list
    String beanName = "HelixAlerts:alert=" + summaryKey;
    Map<String, Object> beanValueMap = jmxMBeanObserver._beanValueMap.get(beanName);
    String history1 = (String) (beanValueMap.get("AlertFiredHistory"));
View Full Code Here

      alertResultMap1.put(alertName, valueAndStatus);
    }

    beanCollection.setAlerts(originAlert1, alertResultMap1, clusterName);
    beanCollection.refreshAlertDelta(clusterName);
    jmxMBeanObserver.refresh();

    beanValueMap = jmxMBeanObserver._beanValueMap.get(beanName);
    history1 = (String) (beanValueMap.get("AlertFiredHistory"));

    sr = new StringReader(history1);
View Full Code Here

    beanCollection.setAlerts(originAlert1, alertResultMap1, clusterName);
    beanCollection.setAlerts(originAlert2, alertResultMap2, clusterName);

    beanCollection.refreshAlertDelta(clusterName);
    String summaryKey = ClusterAlertMBeanCollection.ALERT_SUMMARY + "_" + clusterName;
    jmxMBeanObserver.refresh();

    Assert.assertEquals(jmxMBeanObserver._beanValueMap.size(), nAlerts2 + nAlerts1 + 1);

    Thread.sleep(300);
View Full Code Here

    beanCollection.checkMBeanFreshness(200);

    for (int i = 0; i < 20; i++) {
      Thread.sleep(500);

      jmxMBeanObserver.refresh();

      if (jmxMBeanObserver._beanValueMap.size() == nAlerts1 + 1) {
        break;
      }
    }
View Full Code Here

    beanCollection.setAlerts(originAlert1, alertResultMap1, clusterName);
    beanCollection.setAlerts(originAlert2, alertResultMap2, clusterName);

    beanCollection.refreshAlertDelta(clusterName);
    String summaryKey = ClusterAlertMBeanCollection.ALERT_SUMMARY + "_" + clusterName;
    jmxMBeanObserver.refresh();

    // Get the history list
    String beanName = "HelixAlerts:alert=" + summaryKey;
    Map<String, Object> beanValueMap = jmxMBeanObserver._beanValueMap.get(beanName);
    String history1 = (String) (beanValueMap.get("AlertFiredHistory"));
View Full Code Here

      alertResultMap1.put(alertName, valueAndStatus);
    }

    beanCollection.setAlerts(originAlert1, alertResultMap1, clusterName);
    beanCollection.refreshAlertDelta(clusterName);
    jmxMBeanObserver.refresh();

    beanValueMap = jmxMBeanObserver._beanValueMap.get(beanName);
    history1 = (String) (beanValueMap.get("AlertFiredHistory"));

    sr = new StringReader(history1);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.