Examples of alertStatus()


Examples of com.linkedin.helix.PropertyKey.Builder.alertStatus()

    // for (int i = 0; i < 1; i++) //change 1 back to 5
    // {
    // String instance = "localhost_" + (12918 + i);
    // String instance = "localhost_12918";
    ZNRecord record = accessor.getProperty(keyBuilder.alertStatus()).getRecord();
    Map<String, Map<String, String>> recMap = record.getMapFields();
    Set<String> keySet = recMap.keySet();
    Map<String, String> alertStatusMap = recMap.get(_alertStatusStr);
    String val = alertStatusMap.get(AlertValueAndStatus.VALUE_NAME);
    boolean fired = Boolean.parseBoolean(alertStatusMap.get(AlertValueAndStatus.FIRED_NAME));
View Full Code Here

Examples of com.linkedin.helix.PropertyKey.Builder.alertStatus()

      hsMap.put(instanceName, childValuesMap);
    }
    _healthStatMap = Collections.unmodifiableMap(hsMap);
    _persistentStats = accessor.getProperty(keyBuilder.persistantStat());
    _alerts = accessor.getProperty(keyBuilder.alerts());
    _alertStatus = accessor.getProperty(keyBuilder.alertStatus());

    return true;

  }
View Full Code Here

Examples of com.linkedin.helix.PropertyKey.Builder.alertStatus()

    //for (int i = 0; i < 1; i++) //change 1 back to 5
    //{
      //String instance = "localhost_" + (12918 + i);
      //String instance = "localhost_12918";
      ZNRecord record = accessor.getProperty(keyBuilder.alertStatus()).getRecord();
      Map<String, Map<String,String>> recMap = record.getMapFields();
      Set<String> keySet = recMap.keySet();
      Map<String,String> alertStatusMap = recMap.get(_alertStatusStr);
      String val = alertStatusMap.get(AlertValueAndStatus.VALUE_NAME);
      boolean fired = Boolean.parseBoolean(alertStatusMap.get(AlertValueAndStatus.FIRED_NAME));
View Full Code Here

Examples of com.linkedin.helix.PropertyKey.Builder.alertStatus()

    Builder keyBuilder = accessor.keyBuilder();
    //for (int i = 0; i < 1; i++) //change 1 back to 5
    //{
      //String instance = "localhost_" + (12918 + i);
      //String instance = "localhost_12918";
      ZNRecord record = accessor.getProperty(keyBuilder.alertStatus()).getRecord();
      Map<String, Map<String,String>> recMap = record.getMapFields();
      Set<String> keySet = recMap.keySet();
      Map<String,String> alertStatusMap = recMap.get(_alertStatusStr);
      String val = alertStatusMap.get(AlertValueAndStatus.VALUE_NAME);
      boolean fired = Boolean.parseBoolean(alertStatusMap.get(AlertValueAndStatus.FIRED_NAME));
View Full Code Here

Examples of com.linkedin.helix.PropertyKey.Builder.alertStatus()

    ZKHelixDataAccessor accessor = new ZKHelixDataAccessor(clusterName, new ZkBaseDataAccessor(_zkClient));
    Builder keyBuilder = accessor.keyBuilder();

    new HealthStatsAggregationTask(cmResult._manager).run();
    String instance = "localhost_12918";
    ZNRecord record = accessor.getProperty(keyBuilder.alertStatus()).getRecord();
    Map<String, Map<String, String>> recMap = record.getMapFields();
    Set<String> keySet = recMap.keySet();
    Assert.assertTrue(keySet.size() > 0);

    _setupTool.getClusterManagementTool().dropAlert(clusterName, _alertStr);
View Full Code Here

Examples of com.linkedin.helix.PropertyKey.Builder.alertStatus()

    new HealthStatsAggregationTask(cmResult._manager).run();
    // other verifications go here
    // for (int i = 0; i < 1; i++) //change 1 back to 5
    // {
    // String instance = "localhost_" + (12918 + i);
    record = accessor.getProperty(keyBuilder.alertStatus()).getRecord();
    recMap = record.getMapFields();
    keySet = recMap.keySet();
    Assert.assertEquals(keySet.size(), 0);
    // }
View Full Code Here

Examples of com.linkedin.helix.PropertyKey.Builder.alertStatus()

    Builder keyBuilder = accessor.keyBuilder();
    //for (int i = 0; i < 1; i++) //change 1 back to 5
    //{
      //String instance = "localhost_" + (12918 + i);
      String instance = "localhost_12918";
      ZNRecord record = accessor.getProperty(keyBuilder.alertStatus()).getRecord();
      Map<String, Map<String,String>> recMap = record.getMapFields();
      Set<String> keySet = recMap.keySet();
      Map<String,String> alertStatusMap = recMap.get(_alertStatusStr);
      String val = alertStatusMap.get(AlertValueAndStatus.VALUE_NAME);
      boolean fired = Boolean.parseBoolean(alertStatusMap.get(AlertValueAndStatus.FIRED_NAME));
View Full Code Here

Examples of com.linkedin.helix.PropertyKey.Builder.alertStatus()

    Thread.sleep(1000);

    // other verifications go here
    ZKHelixDataAccessor accessor = new ZKHelixDataAccessor(clusterName, new ZkBaseDataAccessor(_zkClient));
    Builder keyBuilder = accessor.keyBuilder();
    ZNRecord record = accessor.getProperty(keyBuilder.alertStatus()).getRecord();
    Map<String, Map<String,String>> recMap = record.getMapFields();
    for(int i = 0; i < 2; i++)
    {
      String alertString = "(localhost_"+(12944 + i)+".RestQueryStats@DBName=TestDB0.latency)";
      Map<String,String> alertStatusMap = recMap.get(alertwildcard+" : " + alertString);
View Full Code Here

Examples of com.linkedin.helix.PropertyKey.Builder.alertStatus()

    alertwildcard = "EXP(decay(1.0)(localhost*.RestQueryStats@DBName=TestDB0.latency))CMP(GREATER)CON(15)";
    _setupTool.getClusterManagementTool().addAlert(clusterName, alertwildcard);
    new HealthStatsAggregationTask(cmResult._manager).run();
    Thread.sleep(1000);
   
    record = accessor.getProperty(keyBuilder.alertStatus()).getRecord();
    recMap = record.getMapFields();
    for(int i = 0; i < 3; i++)
    {
      String alertString = "(localhost_"+(12944 + i)+".RestQueryStats@DBName=TestDB0.latency)";
      Map<String,String> alertStatusMap = recMap.get(alertwildcard+" : " + alertString);
View Full Code Here

Examples of com.linkedin.helix.PropertyKey.Builder.alertStatus()

      hsMap.put(instanceName, childValuesMap);
    }
    _healthStatMap = Collections.unmodifiableMap(hsMap);
    _persistentStats = accessor.getProperty(keyBuilder.persistantStat());
    _alerts = accessor.getProperty(keyBuilder.alerts());
    _alertStatus = accessor.getProperty(keyBuilder.alertStatus());

    return true;

  }
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.