Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.apache.helix.model;
   * Licensed to the Apache Software Foundation (ASF) under one
   * or more contributor license agreements.  See the NOTICE file
   * distributed with this work for additional information
   * regarding copyright ownership.  The ASF licenses this file
   * to you under the Apache License, Version 2.0 (the
   * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
 import java.util.Map;
Get characteristics of alerts, whether they were fired, and their context. An alert is triggered when cluster health violates pre-defined constraints to ensure that the cluster meets SLAs.
 public class AlertStatus extends HelixProperty {

The name of the ZNode containing alert status
   public final static String nodeName = "AlertStatus";

Instantiate with an identifier

id identifier representing this group of alert statuses
   public AlertStatus(String id) {

Instantiate with a pre-populated record corresponding to alert status

record ZNRecord representing alert statuses
   public AlertStatus(ZNRecord record) {
     // _record = record;
    * public Alerts(ZNRecord record, Stat stat) { super(record, stat); }

Set the session that these alerts correspond to

sessionId session for which to look up alerts
   public void setSessionId(String sessionId) {

Get the session that these alerts correspond to

session identifier
   public String getSessionId() {

Get the instance that these alerts correspond to

name of the instance
   public String getInstanceName() {
     return .getId();
    * public String getVersion() { return
    * _record.getSimpleField(AlertsProperty.CLUSTER_MANAGER_VERSION.toString()); }

Get the properties of all alerts, such as if they were fired

all alert statuses as a Map of alert to the status properties
   public Map<StringMap<StringString>> getMapFields() {
     return .getMapFields();

Get the statistics of a single alert

statName Name of the alert
alert statistics as a map of name, value pairs
  public Map<StringStringgetStatFields(String statName) {
    return .getMapField(statName);
  public boolean isValid() {
    // TODO Auto-generated method stub
    return true;
New to GrepCode? Check out our FAQ X