helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zzh...@apache.org
Subject [4/6] [HELIX-395] Remove old Helix alert/stat modules
Date Tue, 20 May 2014 22:49:01 GMT
http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/healthcheck/HealthStatsAggregationTask.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/healthcheck/HealthStatsAggregationTask.java b/helix-core/src/main/java/org/apache/helix/healthcheck/HealthStatsAggregationTask.java
deleted file mode 100644
index 05ffaef..0000000
--- a/helix-core/src/main/java/org/apache/helix/healthcheck/HealthStatsAggregationTask.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package org.apache.helix.healthcheck;
-
-/*
- * 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
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Random;
-import java.util.Timer;
-import java.util.TimerTask;
-
-import org.apache.helix.HelixTimerTask;
-import org.apache.log4j.Logger;
-
-public class HealthStatsAggregationTask extends HelixTimerTask {
-  private static final Logger LOG = Logger.getLogger(HealthStatsAggregationTask.class);
-  public final static int DEFAULT_HEALTH_CHECK_LATENCY = 30 * 1000;
-
-  final HealthStatsAggregator _healthStatsAggregator;
-
-  class HealthStatsAggregationTaskTimer extends TimerTask {
-
-    @Override
-    public void run() {
-      _healthStatsAggregator.aggregate();
-    }
-
-  }
-
-  private Timer _timer;
-  private final int _delay;
-  private final int _period;
-
-  public HealthStatsAggregationTask(HealthStatsAggregator healthStatsAggregator, int delay,
-      int period) {
-    _healthStatsAggregator = healthStatsAggregator;
-
-    _delay = delay;
-    _period = period;
-  }
-
-  public HealthStatsAggregationTask(HealthStatsAggregator healthStatsAggregator) {
-    this(healthStatsAggregator, DEFAULT_HEALTH_CHECK_LATENCY, DEFAULT_HEALTH_CHECK_LATENCY);
-  }
-
-  @Override
-  public void start() {
-
-    if (_timer == null) {
-      LOG.info("START HealthStatsAggregationTimerTask");
-
-      // Remove all the previous health check values, if any
-      _healthStatsAggregator.init();
-
-      _timer = new Timer("HealthStatsAggregationTimerTask", true);
-      _timer.scheduleAtFixedRate(new HealthStatsAggregationTaskTimer(),
-          new Random().nextInt(_delay), _period);
-    } else {
-      LOG.warn("HealthStatsAggregationTimerTask already started");
-    }
-  }
-
-  @Override
-  public synchronized void stop() {
-    if (_timer != null) {
-      LOG.info("Stop HealthStatsAggregationTimerTask");
-      _timer.cancel();
-      _healthStatsAggregator.reset();
-      _timer = null;
-    } else {
-      LOG.warn("HealthStatsAggregationTimerTask already stopped");
-    }
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/healthcheck/HealthStatsAggregator.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/healthcheck/HealthStatsAggregator.java b/helix-core/src/main/java/org/apache/helix/healthcheck/HealthStatsAggregator.java
deleted file mode 100644
index bc95e6d..0000000
--- a/helix-core/src/main/java/org/apache/helix/healthcheck/HealthStatsAggregator.java
+++ /dev/null
@@ -1,141 +0,0 @@
-package org.apache.helix.healthcheck;
-
-/*
- * 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
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.helix.ConfigAccessor;
-import org.apache.helix.HelixDataAccessor;
-import org.apache.helix.HelixManager;
-import org.apache.helix.controller.pipeline.Pipeline;
-import org.apache.helix.controller.pipeline.Stage;
-import org.apache.helix.controller.stages.ClusterEvent;
-import org.apache.helix.controller.stages.ReadHealthDataStage;
-import org.apache.helix.controller.stages.StatsAggregationStage;
-import org.apache.helix.model.ConfigScope;
-import org.apache.helix.model.builder.ConfigScopeBuilder;
-import org.apache.helix.monitoring.mbeans.ClusterAlertMBeanCollection;
-import org.apache.helix.monitoring.mbeans.HelixStageLatencyMonitor;
-import org.apache.log4j.Logger;
-
-public class HealthStatsAggregator {
-  private static final Logger LOG = Logger.getLogger(HealthStatsAggregator.class);
-
-  public final static int DEFAULT_HEALTH_CHECK_LATENCY = 30 * 1000;
-
-  private final HelixManager _manager;
-  private final Pipeline _healthStatsAggregationPipeline;
-  private final ClusterAlertMBeanCollection _alertItemCollection;
-  private final Map<String, HelixStageLatencyMonitor> _stageLatencyMonitorMap =
-      new HashMap<String, HelixStageLatencyMonitor>();
-
-  public HealthStatsAggregator(HelixManager manager) {
-    _manager = manager;
-
-    // health stats pipeline
-    _healthStatsAggregationPipeline = new Pipeline();
-    _healthStatsAggregationPipeline.addStage(new ReadHealthDataStage());
-    StatsAggregationStage statAggregationStage = new StatsAggregationStage();
-    _healthStatsAggregationPipeline.addStage(statAggregationStage);
-    _alertItemCollection = statAggregationStage.getClusterAlertMBeanCollection();
-
-    registerStageLatencyMonitor(_healthStatsAggregationPipeline);
-  }
-
-  private void registerStageLatencyMonitor(Pipeline pipeline) {
-    for (Stage stage : pipeline.getStages()) {
-      String stgName = stage.getStageName();
-      if (!_stageLatencyMonitorMap.containsKey(stgName)) {
-        try {
-          _stageLatencyMonitorMap.put(stage.getStageName(),
-              new HelixStageLatencyMonitor(_manager.getClusterName(), stgName));
-        } catch (Exception e) {
-          LOG.error("Couldn't create StageLatencyMonitor mbean for stage: " + stgName, e);
-        }
-      } else {
-        LOG.error("StageLatencyMonitor for stage: " + stgName + " already exists. Skip register it");
-      }
-    }
-  }
-
-  public synchronized void aggregate() {
-    if (!isEnabled()) {
-      LOG.info("HealthAggregationTask is disabled.");
-      return;
-    }
-
-    if (!_manager.isLeader()) {
-      LOG.error("Cluster manager: " + _manager.getInstanceName()
-          + " is not leader. Pipeline will not be invoked");
-      return;
-    }
-
-    try {
-      ClusterEvent event = new ClusterEvent("healthChange");
-      event.addAttribute("helixmanager", _manager);
-      event.addAttribute("HelixStageLatencyMonitorMap", _stageLatencyMonitorMap);
-
-      _healthStatsAggregationPipeline.handle(event);
-      _healthStatsAggregationPipeline.finish();
-    } catch (Exception e) {
-      LOG.error("Exception while executing pipeline: " + _healthStatsAggregationPipeline, e);
-    }
-  }
-
-  private boolean isEnabled() {
-    ConfigAccessor configAccessor = _manager.getConfigAccessor();
-    boolean enabled = true;
-    if (configAccessor != null) {
-      // zk-based cluster manager
-      ConfigScope scope = new ConfigScopeBuilder().forCluster(_manager.getClusterName()).build();
-      String isEnabled = configAccessor.get(scope, "healthChange.enabled");
-      if (isEnabled != null) {
-        enabled = new Boolean(isEnabled);
-      }
-    } else {
-      LOG.debug("File-based cluster manager doesn't support disable healthChange");
-    }
-    return enabled;
-  }
-
-  public void init() {
-    // Remove all the previous health check values, if any
-    HelixDataAccessor accessor = _manager.getHelixDataAccessor();
-    List<String> existingHealthRecordNames =
-        accessor.getChildNames(accessor.keyBuilder().healthReports(_manager.getInstanceName()));
-    for (String healthReportName : existingHealthRecordNames) {
-      LOG.info("Removing old healthrecord " + healthReportName);
-      accessor.removeProperty(accessor.keyBuilder().healthReport(_manager.getInstanceName(),
-          healthReportName));
-    }
-
-  }
-
-  public void reset() {
-    _alertItemCollection.reset();
-
-    for (HelixStageLatencyMonitor stgLatencyMonitor : _stageLatencyMonitorMap.values()) {
-      stgLatencyMonitor.reset();
-    }
-
-  }
-}

http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/healthcheck/ParticipantHealthReportCollector.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/healthcheck/ParticipantHealthReportCollector.java b/helix-core/src/main/java/org/apache/helix/healthcheck/ParticipantHealthReportCollector.java
deleted file mode 100644
index 266ed8b..0000000
--- a/helix-core/src/main/java/org/apache/helix/healthcheck/ParticipantHealthReportCollector.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.apache.helix.healthcheck;
-
-/*
- * 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
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.helix.ZNRecord;
-
-public interface ParticipantHealthReportCollector {
-  public abstract void addHealthReportProvider(HealthReportProvider provider);
-
-  public abstract void removeHealthReportProvider(HealthReportProvider provider);
-
-  public abstract void reportHealthReportMessage(ZNRecord healthReport);
-
-  public abstract void transmitHealthReports();
-}

http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/healthcheck/ParticipantHealthReportCollectorImpl.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/healthcheck/ParticipantHealthReportCollectorImpl.java b/helix-core/src/main/java/org/apache/helix/healthcheck/ParticipantHealthReportCollectorImpl.java
deleted file mode 100644
index a300a02..0000000
--- a/helix-core/src/main/java/org/apache/helix/healthcheck/ParticipantHealthReportCollectorImpl.java
+++ /dev/null
@@ -1,115 +0,0 @@
-package org.apache.helix.healthcheck;
-
-/*
- * 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
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.LinkedList;
-import java.util.Map;
-
-import org.apache.helix.HelixDataAccessor;
-import org.apache.helix.HelixManager;
-import org.apache.helix.ZNRecord;
-import org.apache.helix.PropertyKey.Builder;
-import org.apache.helix.alerts.StatsHolder;
-import org.apache.helix.model.HealthStat;
-import org.apache.log4j.Logger;
-
-public class ParticipantHealthReportCollectorImpl implements ParticipantHealthReportCollector {
-  private final LinkedList<HealthReportProvider> _healthReportProviderList =
-      new LinkedList<HealthReportProvider>();
-  private static final Logger _logger = Logger
-      .getLogger(ParticipantHealthReportCollectorImpl.class);
-  private final HelixManager _helixManager;
-  String _instanceName;
-
-  public ParticipantHealthReportCollectorImpl(HelixManager helixManager, String instanceName) {
-    _helixManager = helixManager;
-    _instanceName = instanceName;
-    addDefaultHealthCheckInfoProvider();
-  }
-
-  private void addDefaultHealthCheckInfoProvider() {
-    addHealthReportProvider(new DefaultHealthReportProvider());
-  }
-
-  @Override
-  public void addHealthReportProvider(HealthReportProvider provider) {
-    try {
-      synchronized (_healthReportProviderList) {
-        if (!_healthReportProviderList.contains(provider)) {
-          _healthReportProviderList.add(provider);
-        } else {
-          _logger.warn("Skipping a duplicated HealthCheckInfoProvider");
-        }
-      }
-    } catch (Exception e) {
-      _logger.error(e);
-    }
-  }
-
-  @Override
-  public void removeHealthReportProvider(HealthReportProvider provider) {
-    synchronized (_healthReportProviderList) {
-      if (_healthReportProviderList.contains(provider)) {
-        _healthReportProviderList.remove(provider);
-      } else {
-        _logger.warn("Skip removing a non-exist HealthCheckInfoProvider");
-      }
-    }
-  }
-
-  @Override
-  public void reportHealthReportMessage(ZNRecord healthCheckInfoUpdate) {
-    HelixDataAccessor accessor = _helixManager.getHelixDataAccessor();
-    Builder keyBuilder = accessor.keyBuilder();
-    accessor.setProperty(keyBuilder.healthReport(_instanceName, healthCheckInfoUpdate.getId()),
-        new HealthStat(healthCheckInfoUpdate));
-
-  }
-
-  @Override
-  public synchronized void transmitHealthReports() {
-    synchronized (_healthReportProviderList) {
-      for (HealthReportProvider provider : _healthReportProviderList) {
-        try {
-          Map<String, String> report = provider.getRecentHealthReport();
-          Map<String, Map<String, String>> partitionReport =
-              provider.getRecentPartitionHealthReport();
-          ZNRecord record = new ZNRecord(provider.getReportName());
-          if (report != null) {
-            record.setSimpleFields(report);
-          }
-          if (partitionReport != null) {
-            record.setMapFields(partitionReport);
-          }
-          record.setSimpleField(StatsHolder.TIMESTAMP_NAME, "" + System.currentTimeMillis());
-
-          HelixDataAccessor accessor = _helixManager.getHelixDataAccessor();
-          Builder keyBuilder = accessor.keyBuilder();
-          accessor.setProperty(keyBuilder.healthReport(_instanceName, record.getId()),
-              new HealthStat(record));
-
-          provider.resetStats();
-        } catch (Exception e) {
-          _logger.error("fail to transmit health report", e);
-        }
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/healthcheck/ParticipantHealthReportTask.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/healthcheck/ParticipantHealthReportTask.java b/helix-core/src/main/java/org/apache/helix/healthcheck/ParticipantHealthReportTask.java
deleted file mode 100644
index 59d74c7..0000000
--- a/helix-core/src/main/java/org/apache/helix/healthcheck/ParticipantHealthReportTask.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.apache.helix.healthcheck;
-
-/*
- * 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
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Random;
-import java.util.Timer;
-import java.util.TimerTask;
-
-import org.apache.helix.HelixTimerTask;
-import org.apache.log4j.Logger;
-
-public class ParticipantHealthReportTask extends HelixTimerTask {
-  private static final Logger LOG = Logger.getLogger(ParticipantHealthReportTask.class);
-  public final static int DEFAULT_REPORT_LATENCY = 60 * 1000;
-
-  Timer _timer;
-  final ParticipantHealthReportCollectorImpl _healthReportCollector;
-
-  class ParticipantHealthReportTimerTask extends TimerTask {
-
-    @Override
-    public void run() {
-      _healthReportCollector.transmitHealthReports();
-    }
-  }
-
-  public ParticipantHealthReportTask(ParticipantHealthReportCollectorImpl healthReportCollector) {
-    _healthReportCollector = healthReportCollector;
-  }
-
-  @Override
-  public void start() {
-    if (_timer == null) {
-      LOG.info("Start HealthCheckInfoReportingTask");
-      _timer = new Timer("ParticipantHealthReportTimerTask", true);
-      _timer.scheduleAtFixedRate(new ParticipantHealthReportTimerTask(),
-          new Random().nextInt(DEFAULT_REPORT_LATENCY), DEFAULT_REPORT_LATENCY);
-    } else {
-      LOG.warn("ParticipantHealthReportTimerTask already started");
-    }
-  }
-
-  @Override
-  public void stop() {
-    if (_timer != null) {
-      LOG.info("Stop ParticipantHealthReportTimerTask");
-      _timer.cancel();
-      _timer = null;
-    } else {
-      LOG.warn("ParticipantHealthReportTimerTask already stopped");
-    }
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/healthcheck/PerformanceHealthReportProvider.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/healthcheck/PerformanceHealthReportProvider.java b/helix-core/src/main/java/org/apache/helix/healthcheck/PerformanceHealthReportProvider.java
deleted file mode 100644
index 3a151a7..0000000
--- a/helix-core/src/main/java/org/apache/helix/healthcheck/PerformanceHealthReportProvider.java
+++ /dev/null
@@ -1,138 +0,0 @@
-package org.apache.helix.healthcheck;
-
-/*
- * 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
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.apache.log4j.Logger;
-
-public class PerformanceHealthReportProvider extends HealthReportProvider {
-
-  private static final Logger _logger = Logger.getLogger(PerformanceHealthReportProvider.class);
-
-  public final static String _testStat = "testStat";
-  public final static String _readLatencyStat = "readLatencyStat";
-  public final static String _requestCountStat = "requestCountStat";
-  public final static String _partitionRequestCountStat = "partitionRequestCountStat";
-
-  public static final String _performanceCounters = "performanceCounters";
-
-  public int readLatencyCount = 0;
-  public double readLatencySum = 0;
-
-  public int requestCount = 0;
-
-  // private final Map<String, String> _partitionCountsMap = new HashMap<String,
-  // String>();
-
-  private final Map<String, HashMap<String, String>> _partitionStatMaps =
-      new HashMap<String, HashMap<String, String>>();
-
-  public PerformanceHealthReportProvider() {
-  }
-
-  @Override
-  public Map<String, String> getRecentHealthReport() {
-    long testStat = 10;
-
-    Map<String, String> result = new TreeMap<String, String>();
-
-    result.put(_testStat, "" + testStat);
-    result.put(_readLatencyStat, "" + readLatencySum / (double) readLatencyCount);
-    result.put(_requestCountStat, "" + requestCount);
-
-    return result;
-  }
-
-  @Override
-  public Map<String, Map<String, String>> getRecentPartitionHealthReport() {
-    Map<String, Map<String, String>> result = new TreeMap<String, Map<String, String>>();
-    for (String statName : _partitionStatMaps.keySet()) {
-      result.put(statName, _partitionStatMaps.get(statName));
-    }
-    return result;
-  }
-
-  HashMap<String, String> getStatMap(String statName, boolean createIfMissing) {
-    // check if map for this stat exists. if not, create it
-    HashMap<String, String> statMap;
-    if (!_partitionStatMaps.containsKey(statName)) {
-      if (!createIfMissing) {
-        return null;
-      }
-      statMap = new HashMap<String, String>();
-      _partitionStatMaps.put(statName, statMap);
-    } else {
-      statMap = _partitionStatMaps.get(statName);
-    }
-    return statMap;
-  }
-
-  // TODO:
-  // Currently participant is source of truth and updates ZK. We want ZK to be
-  // source of truth.
-  // Revise this approach the participant sends deltas of stats to controller
-  // (ZK?) and have controller do aggregation
-  // and update ZK. Make sure to wipe the participant between uploads.
-  String getPartitionStat(HashMap<String, String> partitionMap, String partitionName) {
-    return partitionMap.get(partitionName);
-  }
-
-  void setPartitionStat(HashMap<String, String> partitionMap, String partitionName, String value) {
-    partitionMap.put(partitionName, value);
-  }
-
-  public void incrementPartitionStat(String statName, String partitionName) {
-    HashMap<String, String> statMap = getStatMap(statName, true);
-    String currValStr = getPartitionStat(statMap, partitionName);
-    double currVal;
-    if (currValStr == null) {
-      currVal = 1.0;
-    } else {
-      currVal = Double.parseDouble(getPartitionStat(statMap, partitionName));
-      currVal++;
-    }
-    setPartitionStat(statMap, partitionName, String.valueOf(currVal));
-  }
-
-  public void submitPartitionStat(String statName, String partitionName, String value) {
-    HashMap<String, String> statMap = getStatMap(statName, true);
-    setPartitionStat(statMap, partitionName, value);
-  }
-
-  public String getPartitionStat(String statName, String partitionName) {
-    HashMap<String, String> statMap = getStatMap(statName, false);
-    if (statMap == null) {
-      return null;
-    } else {
-      return statMap.get(partitionName);
-    }
-  }
-
-  public void resetStats() {
-    _partitionStatMaps.clear();
-  }
-
-  public String getReportName() {
-    return _performanceCounters;
-  }
-}

http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/healthcheck/Stat.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/healthcheck/Stat.java b/helix-core/src/main/java/org/apache/helix/healthcheck/Stat.java
deleted file mode 100644
index d5a31d4..0000000
--- a/helix-core/src/main/java/org/apache/helix/healthcheck/Stat.java
+++ /dev/null
@@ -1,125 +0,0 @@
-package org.apache.helix.healthcheck;
-
-/*
- * 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
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.log4j.Logger;
-
-import java.util.Map;
-
-public class Stat {
-
-  private static final Logger _logger = Logger.getLogger(Stat.class);
-
-  public final static String OP_TYPE = "HTTP_OP";
-  public final static String MEASUREMENT_TYPE = "MEASUREMENT";
-  public final static String RESOURCE_NAME = "RESOURCE_NAME";
-  public final static String PARTITION_NAME = "PARTITION_NAME";
-  public final static String NODE_NAME = "NODE_NAME";
-  public final static String TIMESTAMP = "TIMESTAMP";
-  public final static String RETURN_STATUS = "RETURN_STATUS";
-  public final static String METRIC_NAME = "METRIC_NAME";
-  public final static String AGG_TYPE = "AGG_TYPE";
-
-  public String _opType;
-  public String _measurementType;
-  public String _resourceName;
-  public String _partitionName;
-  public String _nodeName;
-  public String _returnStatus;
-  public String _metricName;
-  public String _aggTypeName;
-  public String _timestamp;
-
-  public Stat(String opType, String measurementType, String resourceName, String partitionName,
-      String nodeName) {
-    // this(opType, measurementType, resourceName, partitionName, nodeName,
-    // null, null, null);
-    this(opType, measurementType, resourceName, partitionName, nodeName, null, null, null);
-  }
-
-  public Stat(String opType, String measurementType, String resourceName, String partitionName,
-      String nodeName, String returnStatus, String metricName, AggregationType aggType) {
-    this._opType = opType;
-    this._measurementType = measurementType;
-    this._resourceName = resourceName;
-    this._partitionName = partitionName;
-    this._nodeName = nodeName;
-    this._returnStatus = returnStatus;
-    this._metricName = metricName;
-    this._aggTypeName = null;
-    if (aggType != null) {
-      this._aggTypeName = aggType.getName();
-    }
-
-    _timestamp = String.valueOf(System.currentTimeMillis());
-  }
-
-  public Stat(Map<String, String> in) {
-    _opType = in.get(OP_TYPE);
-    _measurementType = in.get(MEASUREMENT_TYPE);
-    _resourceName = in.get(RESOURCE_NAME);
-    _partitionName = in.get(PARTITION_NAME);
-    _nodeName = in.get(NODE_NAME);
-    _timestamp = String.valueOf(System.currentTimeMillis());
-  }
-
-  public void setAggType(AggregationType aggType) {
-    this._aggTypeName = aggType.getName();
-  }
-
-  @Override
-  public boolean equals(Object obj) {
-    if (!(obj instanceof Stat)) {
-      return false;
-    }
-    Stat other = (Stat) obj;
-    if (!_partitionName.equals(other._partitionName)) {
-      return false;
-    }
-    if (!_opType.equals(other._opType)) {
-      return false;
-    }
-    if (!_measurementType.equals(other._measurementType)) {
-      return false;
-    }
-    if (!_resourceName.equals(other._resourceName)) {
-      return false;
-    }
-    if (!_nodeName.equals(other._nodeName)) {
-      return false;
-    }
-    return true;
-  }
-
-  @Override
-  public int hashCode() {
-    return (_partitionName + _opType + _measurementType + _resourceName + _nodeName).hashCode();
-  }
-
-  public void addAlert(long value) {
-    // TODO Auto-generated method stub
-
-  }
-
-  public String toString() {
-    return _nodeName + "." + _resourceName + "." + _partitionName + "." + _opType + "."
-        + _measurementType + "." + _returnStatus + "." + _metricName + "." + _aggTypeName;
-  }
-}

http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/healthcheck/StatHealthReportProvider.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/healthcheck/StatHealthReportProvider.java b/helix-core/src/main/java/org/apache/helix/healthcheck/StatHealthReportProvider.java
deleted file mode 100644
index 04bb943..0000000
--- a/helix-core/src/main/java/org/apache/helix/healthcheck/StatHealthReportProvider.java
+++ /dev/null
@@ -1,159 +0,0 @@
-package org.apache.helix.healthcheck;
-
-/*
- * 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
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.log4j.Logger;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-
-public class StatHealthReportProvider extends HealthReportProvider {
-
-  private static final Logger _logger = Logger.getLogger(StatHealthReportProvider.class);
-
-  /*
-   * public final static String _testStat = "testStat"; public final static
-   * String _readLatencyStat = "readLatencyStat"; public final static String
-   * _requestCountStat = "requestCountStat"; public final static String
-   * _partitionRequestCountStat = "partitionRequestCountStat";
-   */
-
-  public static final String REPORT_NAME = "ParticipantStats";
-  public String _reportName = REPORT_NAME;
-
-  public static final String STAT_VALUE = "value";
-  public static final String TIMESTAMP = "timestamp";
-
-  public int readLatencyCount = 0;
-  public double readLatencySum = 0;
-
-  public int requestCount = 0;
-
-  // private final Map<String, String> _partitionCountsMap = new HashMap<String,
-  // String>();
-
-  // private final Map<String, HashMap<String,String>> _partitionStatMaps = new
-  // HashMap<String, HashMap<String,String>>();
-  private final ConcurrentHashMap<String, String> _statsToValues =
-      new ConcurrentHashMap<String, String>();
-  private final ConcurrentHashMap<String, String> _statsToTimestamps =
-      new ConcurrentHashMap<String, String>();
-
-  public StatHealthReportProvider() {
-  }
-
-  @Override
-  public Map<String, String> getRecentHealthReport() {
-    return null;
-  }
-
-  // TODO: function is misnamed, but return type is what I want
-  @Override
-  public Map<String, Map<String, String>> getRecentPartitionHealthReport() {
-    Map<String, Map<String, String>> result = new HashMap<String, Map<String, String>>();
-    for (String stat : _statsToValues.keySet()) {
-      Map<String, String> currStat = new HashMap<String, String>();
-      /*
-       * currStat.put(Stat.OP_TYPE, stat._opType);
-       * currStat.put(Stat.MEASUREMENT_TYPE, stat._measurementType);
-       * currStat.put(Stat.NODE_NAME, stat._nodeName);
-       * currStat.put(Stat.PARTITION_NAME, stat._partitionName);
-       * currStat.put(Stat.RESOURCE_NAME, stat._resourceName);
-       * currStat.put(Stat.RETURN_STATUS, stat._returnStatus);
-       * currStat.put(Stat.METRIC_NAME, stat._metricName);
-       * currStat.put(Stat.AGG_TYPE, stat._aggTypeName);
-       */
-      currStat.put(TIMESTAMP, _statsToTimestamps.get(stat));
-      currStat.put(STAT_VALUE, _statsToValues.get(stat));
-      result.put(stat, currStat);
-    }
-    return result;
-  }
-
-  public boolean contains(Stat inStat) {
-    return _statsToValues.containsKey(inStat);
-  }
-
-  public Set<String> keySet() {
-    return _statsToValues.keySet();
-  }
-
-  public String getStatValue(Stat inStat) {
-    return _statsToValues.get(inStat);
-  }
-
-  public long getStatTimestamp(Stat inStat) {
-    return Long.parseLong(_statsToTimestamps.get(inStat));
-  }
-
-  /*
-   * public String getStatValue(String opType, String measurementType, String
-   * resourceName, String partitionName, String nodeName, boolean
-   * createIfMissing) { Stat rs = new Stat(opType, measurementType,
-   * resourceName, partitionName, nodeName); String val =
-   * _statsToValues.get(rs); if (val == null && createIfMissing) { val = "0";
-   * _statsToValues.put(rs, val); } return val; }
-   */
-
-  public void writeStat(String statName, String val, String timestamp) {
-    _statsToValues.put(statName, val);
-    _statsToTimestamps.put(statName, timestamp);
-  }
-
-  /*
-   * public void setStat(Stat es, String val, String timestamp) { writeStat(es,
-   * val, timestamp); }
-   * public void setStat(String opType, String measurementType, String
-   * resourceName, String partitionName, String nodeName, double val, String
-   * timestamp) { Stat rs = new Stat(opType, measurementType, resourceName,
-   * partitionName, nodeName); writeStat(rs, String.valueOf(val), timestamp); }
-   */
-
-  public void incrementStat(String statName, String timestamp) {
-    // Stat rs = new Stat(opType, measurementType, resourceName, partitionName,
-    // nodeName);
-    String val = _statsToValues.get(statName);
-    if (val == null) {
-      val = "0";
-    } else {
-      val = String.valueOf(Double.parseDouble(val) + 1);
-    }
-    writeStat(statName, val, timestamp);
-  }
-
-  public int size() {
-    return _statsToValues.size();
-  }
-
-  public void resetStats() {
-    _statsToValues.clear();
-    _statsToTimestamps.clear();
-  }
-
-  public void setReportName(String name) {
-    _reportName = name;
-  }
-
-  public String getReportName() {
-    return _reportName;
-  }
-}

http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/healthcheck/WindowAggregationType.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/healthcheck/WindowAggregationType.java b/helix-core/src/main/java/org/apache/helix/healthcheck/WindowAggregationType.java
deleted file mode 100644
index 77161af..0000000
--- a/helix-core/src/main/java/org/apache/helix/healthcheck/WindowAggregationType.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package org.apache.helix.healthcheck;
-
-/*
- * 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
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.log4j.Logger;
-
-public class WindowAggregationType implements AggregationType {
-
-  private static final Logger logger = Logger.getLogger(WindowAggregationType.class);
-
-  public final String WINDOW_DELIM = "#";
-
-  public final static String TYPE_NAME = "window";
-
-  int _windowSize = 1;
-
-  public WindowAggregationType(int ws) {
-    super();
-    _windowSize = ws;
-  }
-
-  @Override
-  public String getName() {
-    StringBuilder sb = new StringBuilder();
-    sb.append(TYPE_NAME);
-    sb.append(DELIM);
-    sb.append(_windowSize);
-    return sb.toString();
-  }
-
-  @Override
-  public String merge(String incomingVal, String existingVal, long prevTimestamp) {
-    String[] windowVals;
-    if (existingVal == null) {
-      return incomingVal;
-    } else {
-      windowVals = existingVal.split(WINDOW_DELIM);
-      int currLength = windowVals.length;
-      // window not full
-      if (currLength < _windowSize) {
-        return existingVal + WINDOW_DELIM + incomingVal;
-      }
-      // evict oldest
-      else {
-        int firstDelim = existingVal.indexOf(WINDOW_DELIM);
-        return existingVal.substring(firstDelim + 1) + WINDOW_DELIM + incomingVal;
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/healthcheck/package-info.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/healthcheck/package-info.java b/helix-core/src/main/java/org/apache/helix/healthcheck/package-info.java
deleted file mode 100644
index f584b5b..0000000
--- a/helix-core/src/main/java/org/apache/helix/healthcheck/package-info.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * 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
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/**
- * Helix health check classes
- * 
- */
-package org.apache.helix.healthcheck;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/manager/zk/CallbackHandler.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/CallbackHandler.java b/helix-core/src/main/java/org/apache/helix/manager/zk/CallbackHandler.java
index b59976d..65fe2f9 100644
--- a/helix-core/src/main/java/org/apache/helix/manager/zk/CallbackHandler.java
+++ b/helix-core/src/main/java/org/apache/helix/manager/zk/CallbackHandler.java
@@ -41,7 +41,6 @@ import org.apache.helix.ConfigChangeListener;
 import org.apache.helix.ControllerChangeListener;
 import org.apache.helix.CurrentStateChangeListener;
 import org.apache.helix.ExternalViewChangeListener;
-import org.apache.helix.HealthStateChangeListener;
 import org.apache.helix.HelixConstants.ChangeType;
 import org.apache.helix.HelixDataAccessor;
 import org.apache.helix.HelixException;
@@ -49,19 +48,16 @@ import org.apache.helix.HelixManager;
 import org.apache.helix.HelixProperty;
 import org.apache.helix.IdealStateChangeListener;
 import org.apache.helix.InstanceConfigChangeListener;
-import org.apache.helix.InstanceType;
 import org.apache.helix.LiveInstanceChangeListener;
 import org.apache.helix.MessageListener;
 import org.apache.helix.NotificationContext;
 import org.apache.helix.NotificationContext.Type;
 import org.apache.helix.PropertyKey;
-import org.apache.helix.PropertyKey.Builder;
 import org.apache.helix.PropertyPathConfig;
 import org.apache.helix.ScopedConfigChangeListener;
 import org.apache.helix.ZNRecord;
 import org.apache.helix.model.CurrentState;
 import org.apache.helix.model.ExternalView;
-import org.apache.helix.model.HealthStat;
 import org.apache.helix.model.IdealState;
 import org.apache.helix.model.InstanceConfig;
 import org.apache.helix.model.LiveInstance;
@@ -211,15 +207,6 @@ public class CallbackHandler implements IZkChildListener, IZkDataListener
         ControllerChangeListener controllerChangelistener = (ControllerChangeListener) _listener;
         subscribeForChanges(changeContext, _path, true, false);
         controllerChangelistener.onControllerChange(changeContext);
-      } else if (_changeType == ChangeType.HEALTH) {
-        HealthStateChangeListener healthStateChangeListener = (HealthStateChangeListener) _listener;
-        subscribeForChanges(changeContext, _path, true, true); // TODO: figure out
-        // settings here
-        String instanceName = PropertyPathConfig.getInstanceNameFromPath(_path);
-
-        List<HealthStat> healthReportList = _accessor.getChildValues(_propertyKey);
-
-        healthStateChangeListener.onHealthChange(instanceName, healthReportList, changeContext);
       }
 
       long end = System.currentTimeMillis();

http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/manager/zk/ParticipantManagerHelper.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/ParticipantManagerHelper.java b/helix-core/src/main/java/org/apache/helix/manager/zk/ParticipantManagerHelper.java
index cfce1da..b80ae55 100644
--- a/helix-core/src/main/java/org/apache/helix/manager/zk/ParticipantManagerHelper.java
+++ b/helix-core/src/main/java/org/apache/helix/manager/zk/ParticipantManagerHelper.java
@@ -281,15 +281,4 @@ public class ParticipantManagerHelper {
 
   }
 
-  /**
-   * create zk path for health check info
-   * TODO move it to cluster-setup
-   */
-  public void createHealthCheckPath() {
-    String healthCheckInfoPath = _dataAccessor.keyBuilder().healthReports(_instanceName).getPath();
-    if (!_zkclient.exists(healthCheckInfoPath)) {
-      _zkclient.createPersistent(healthCheckInfoPath, true);
-      LOG.info("Created healthcheck info path " + healthCheckInfoPath);
-    }
-  }
 }

http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixAdmin.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixAdmin.java b/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixAdmin.java
index ff50118..70b0387 100644
--- a/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixAdmin.java
+++ b/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixAdmin.java
@@ -51,9 +51,6 @@ import org.apache.helix.PropertyKey.Builder;
 import org.apache.helix.PropertyPathConfig;
 import org.apache.helix.PropertyType;
 import org.apache.helix.ZNRecord;
-import org.apache.helix.alerts.AlertsHolder;
-import org.apache.helix.alerts.StatsHolder;
-import org.apache.helix.model.Alerts;
 import org.apache.helix.model.ClusterConstraints;
 import org.apache.helix.model.ClusterConstraints.ConstraintType;
 import org.apache.helix.model.ConstraintItem;
@@ -70,7 +67,6 @@ import org.apache.helix.model.Message;
 import org.apache.helix.model.Message.MessageState;
 import org.apache.helix.model.Message.MessageType;
 import org.apache.helix.model.PauseSignal;
-import org.apache.helix.model.PersistentStats;
 import org.apache.helix.model.StateModelDefinition;
 import org.apache.helix.tools.DefaultIdealStateCalculator;
 import org.apache.helix.util.HelixUtil;
@@ -721,79 +717,6 @@ public class ZKHelixAdmin implements HelixAdmin {
   }
 
   @Override
-  public void addStat(String clusterName, final String statName) {
-    if (!ZKUtil.isClusterSetup(clusterName, _zkClient)) {
-      throw new HelixException("cluster " + clusterName + " is not setup yet");
-    }
-
-    String persistentStatsPath =
-        PropertyPathConfig.getPath(PropertyType.PERSISTENTSTATS, clusterName);
-    ZkBaseDataAccessor<ZNRecord> baseAccessor = new ZkBaseDataAccessor<ZNRecord>(_zkClient);
-
-    baseAccessor.update(persistentStatsPath, new DataUpdater<ZNRecord>() {
-
-      @Override
-      public ZNRecord update(ZNRecord statsRec) {
-        if (statsRec == null) {
-          // TODO: fix naming of this record, if it matters
-          statsRec = new ZNRecord(PersistentStats.nodeName);
-        }
-
-        Map<String, Map<String, String>> currStatMap = statsRec.getMapFields();
-        Map<String, Map<String, String>> newStatMap = StatsHolder.parseStat(statName);
-        for (String newStat : newStatMap.keySet()) {
-          if (!currStatMap.containsKey(newStat)) {
-            currStatMap.put(newStat, newStatMap.get(newStat));
-          }
-        }
-        statsRec.setMapFields(currStatMap);
-
-        return statsRec;
-      }
-    }, AccessOption.PERSISTENT);
-  }
-
-  @Override
-  public void addAlert(final String clusterName, final String alertName) {
-    if (!ZKUtil.isClusterSetup(clusterName, _zkClient)) {
-      throw new HelixException("cluster " + clusterName + " is not setup yet");
-    }
-
-    ZkBaseDataAccessor<ZNRecord> baseAccessor = new ZkBaseDataAccessor<ZNRecord>(_zkClient);
-
-    String alertsPath = PropertyPathConfig.getPath(PropertyType.ALERTS, clusterName);
-
-    baseAccessor.update(alertsPath, new DataUpdater<ZNRecord>() {
-
-      @Override
-      public ZNRecord update(ZNRecord alertsRec) {
-        if (alertsRec == null) {
-          // TODO: fix naming of this record, if it matters
-          alertsRec = new ZNRecord(Alerts.nodeName);
-
-        }
-
-        Map<String, Map<String, String>> currAlertMap = alertsRec.getMapFields();
-        StringBuilder newStatName = new StringBuilder();
-        Map<String, String> newAlertMap = new HashMap<String, String>();
-
-        // use AlertsHolder to get map of new stats and map for this alert
-        AlertsHolder.parseAlert(alertName, newStatName, newAlertMap);
-
-        // add stat
-        addStat(clusterName, newStatName.toString());
-
-        // add alert
-        currAlertMap.put(alertName, newAlertMap);
-
-        alertsRec.setMapFields(currAlertMap);
-
-        return alertsRec;
-      }
-    }, AccessOption.PERSISTENT);
-  }
-
-  @Override
   public void dropCluster(String clusterName) {
     logger.info("Deleting cluster " + clusterName);
     ZKHelixDataAccessor accessor =
@@ -814,70 +737,6 @@ public class ZKHelixAdmin implements HelixAdmin {
   }
 
   @Override
-  public void dropStat(String clusterName, final String statName) {
-    if (!ZKUtil.isClusterSetup(clusterName, _zkClient)) {
-      throw new HelixException("cluster " + clusterName + " is not setup yet");
-    }
-
-    String persistentStatsPath =
-        PropertyPathConfig.getPath(PropertyType.PERSISTENTSTATS, clusterName);
-    ZkBaseDataAccessor<ZNRecord> baseAccessor = new ZkBaseDataAccessor<ZNRecord>(_zkClient);
-
-    baseAccessor.update(persistentStatsPath, new DataUpdater<ZNRecord>() {
-
-      @Override
-      public ZNRecord update(ZNRecord statsRec) {
-        if (statsRec == null) {
-          throw new HelixException("No stats record in ZK, nothing to drop");
-        }
-
-        Map<String, Map<String, String>> currStatMap = statsRec.getMapFields();
-        Map<String, Map<String, String>> newStatMap = StatsHolder.parseStat(statName);
-
-        // delete each stat from stat map
-        for (String newStat : newStatMap.keySet()) {
-          if (currStatMap.containsKey(newStat)) {
-            currStatMap.remove(newStat);
-          }
-        }
-        statsRec.setMapFields(currStatMap);
-
-        return statsRec;
-      }
-    }, AccessOption.PERSISTENT);
-  }
-
-  @Override
-  public void dropAlert(String clusterName, final String alertName) {
-    if (!ZKUtil.isClusterSetup(clusterName, _zkClient)) {
-      throw new HelixException("cluster " + clusterName + " is not setup yet");
-    }
-
-    String alertsPath = PropertyPathConfig.getPath(PropertyType.ALERTS, clusterName);
-
-    ZkBaseDataAccessor<ZNRecord> baseAccessor = new ZkBaseDataAccessor<ZNRecord>(_zkClient);
-
-    if (!baseAccessor.exists(alertsPath, 0)) {
-      throw new HelixException("No alerts node in ZK, nothing to drop");
-    }
-
-    baseAccessor.update(alertsPath, new DataUpdater<ZNRecord>() {
-      @Override
-      public ZNRecord update(ZNRecord alertsRec) {
-        if (alertsRec == null) {
-          throw new HelixException("No alerts record in ZK, nothing to drop");
-        }
-
-        Map<String, Map<String, String>> currAlertMap = alertsRec.getMapFields();
-        currAlertMap.remove(alertName);
-        alertsRec.setMapFields(currAlertMap);
-
-        return alertsRec;
-      }
-    }, AccessOption.PERSISTENT);
-  }
-
-  @Override
   public void addClusterToGrandCluster(String clusterName, String grandCluster) {
     if (!ZKUtil.isClusterSetup(grandCluster, _zkClient)) {
       throw new HelixException("Grand cluster " + grandCluster + " is not setup yet");

http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java b/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java
index a5ca409..ed6c8a8 100644
--- a/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java
+++ b/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java
@@ -35,7 +35,6 @@ import org.apache.helix.ConfigChangeListener;
 import org.apache.helix.ControllerChangeListener;
 import org.apache.helix.CurrentStateChangeListener;
 import org.apache.helix.ExternalViewChangeListener;
-import org.apache.helix.HealthStateChangeListener;
 import org.apache.helix.HelixAdmin;
 import org.apache.helix.HelixDataAccessor;
 import org.apache.helix.HelixException;
@@ -57,11 +56,6 @@ import org.apache.helix.PropertyType;
 import org.apache.helix.ScopedConfigChangeListener;
 import org.apache.helix.ZNRecord;
 import org.apache.helix.controller.GenericHelixController;
-import org.apache.helix.healthcheck.HealthStatsAggregationTask;
-import org.apache.helix.healthcheck.HealthStatsAggregator;
-import org.apache.helix.healthcheck.ParticipantHealthReportCollector;
-import org.apache.helix.healthcheck.ParticipantHealthReportCollectorImpl;
-import org.apache.helix.healthcheck.ParticipantHealthReportTask;
 import org.apache.helix.messaging.DefaultMessagingService;
 import org.apache.helix.model.ConfigScope;
 import org.apache.helix.model.HelixConfigScope.ConfigScopeProperty;
@@ -123,7 +117,6 @@ public class ZKHelixManager implements HelixManager, IZkStateListener {
    * participant fields
    */
   private final StateMachineEngine _stateMachineEngine;
-  private final ParticipantHealthReportCollectorImpl _participantHealthInfoCollector;
   private final List<HelixTimerTask> _timerTasks = new ArrayList<HelixTimerTask>();
 
   /**
@@ -220,34 +213,19 @@ public class ZKHelixManager implements HelixManager, IZkStateListener {
     switch (instanceType) {
     case PARTICIPANT:
       _stateMachineEngine = new HelixStateMachineEngine(this);
-      _participantHealthInfoCollector =
-          new ParticipantHealthReportCollectorImpl(this, _instanceName);
-
-      _timerTasks.add(new ParticipantHealthReportTask(_participantHealthInfoCollector));
-
       break;
     case CONTROLLER:
       _stateMachineEngine = null;
-      _participantHealthInfoCollector = null;
-      _controllerTimerTasks.add(new HealthStatsAggregationTask(new HealthStatsAggregator(this)));
       _controllerTimerTasks.add(new StatusDumpTask(_zkclient, this));
 
       break;
     case CONTROLLER_PARTICIPANT:
       _stateMachineEngine = new HelixStateMachineEngine(this);
-      _participantHealthInfoCollector =
-          new ParticipantHealthReportCollectorImpl(this, _instanceName);
-
-      _timerTasks.add(new ParticipantHealthReportTask(_participantHealthInfoCollector));
-
-      _controllerTimerTasks.add(new HealthStatsAggregationTask(new HealthStatsAggregator(this)));
       _controllerTimerTasks.add(new StatusDumpTask(_zkclient, this));
-
       break;
     case ADMINISTRATOR:
     case SPECTATOR:
       _stateMachineEngine = null;
-      _participantHealthInfoCollector = null;
       break;
     default:
       throw new IllegalArgumentException("unrecognized type: " + instanceType);
@@ -419,15 +397,6 @@ public class ZKHelixManager implements HelixManager, IZkStateListener {
   }
 
   @Override
-  public void addHealthStateChangeListener(HealthStateChangeListener listener, String instanceName)
-      throws Exception {
-    addListener(listener, new Builder(_clusterName).healthReports(instanceName), ChangeType.HEALTH,
-        new EventType[] {
-            EventType.NodeChildrenChanged, EventType.NodeDeleted, EventType.NodeCreated
-        });
-  }
-
-  @Override
   public void addExternalViewChangeListener(ExternalViewChangeListener listener) throws Exception {
     addListener(listener, new Builder(_clusterName).externalViews(), ChangeType.EXTERNAL_VIEW,
         new EventType[] {
@@ -627,8 +596,8 @@ public class ZKHelixManager implements HelixManager, IZkStateListener {
       String path = PropertyPathConfig.getPath(PropertyType.PROPERTYSTORE, _clusterName);
       String fallbackPath = String.format("/%s/%s", _clusterName, "HELIX_PROPERTYSTORE");
       _helixPropertyStore =
-          new AutoFallbackPropertyStore<ZNRecord>(new ZkBaseDataAccessor<ZNRecord>(_zkclient), path,
-              fallbackPath);
+          new AutoFallbackPropertyStore<ZNRecord>(new ZkBaseDataAccessor<ZNRecord>(_zkclient),
+              path, fallbackPath);
     }
 
     return _helixPropertyStore;
@@ -653,12 +622,6 @@ public class ZKHelixManager implements HelixManager, IZkStateListener {
   }
 
   @Override
-  public ParticipantHealthReportCollector getHealthReportCollector() {
-    checkConnected();
-    return _participantHealthInfoCollector;
-  }
-
-  @Override
   public InstanceType getInstanceType() {
     return _instanceType;
   }
@@ -882,11 +845,6 @@ public class ZKHelixManager implements HelixManager, IZkStateListener {
      * setup message listener
      */
     participantHelper.setupMsgHandler();
-
-    /**
-     * start health check timer task
-     */
-    participantHelper.createHealthCheckPath();
   }
 
   void handleNewSessionAsController() {

http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/model/HealthStat.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/model/HealthStat.java b/helix-core/src/main/java/org/apache/helix/model/HealthStat.java
deleted file mode 100644
index b884534..0000000
--- a/helix-core/src/main/java/org/apache/helix/model/HealthStat.java
+++ /dev/null
@@ -1,147 +0,0 @@
-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
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.helix.HelixProperty;
-import org.apache.helix.ZNRecord;
-import org.apache.helix.alerts.ExpressionParser;
-import org.apache.helix.alerts.StatsHolder;
-import org.apache.helix.model.Message.Attributes;
-import org.apache.log4j.Logger;
-
-/**
- * Represents a set of properties that can be queried to determine the health of instances on a
- * Helix-managed cluster
- */
-public class HealthStat extends HelixProperty {
-  /**
-   * Queryable health statistic properties
-   */
-  public enum HealthStatProperty {
-    FIELDS
-  }
-
-  private static final Logger _logger = Logger.getLogger(HealthStat.class.getName());
-
-  /**
-   * Instantiate with an identifier
-   * @param id the name of these statistics
-   */
-  public HealthStat(String id) {
-    super(id);
-  }
-
-  /**
-   * Instantiate with a pre-populated record
-   * @param record a ZNRecord corresponding to health statistics
-   */
-  public HealthStat(ZNRecord record) {
-    super(record);
-    if (getCreateTimeStamp() == 0) {
-      _record.setLongField(Attributes.CREATE_TIMESTAMP.toString(), new Date().getTime());
-    }
-  }
-
-  /**
-   * Get when these statistics were last modified
-   * @return a UNIX timestamp
-   */
-  public long getLastModifiedTimeStamp() {
-    return _record.getModifiedTime();
-  }
-
-  /**
-   * Get when these statistics were created
-   * @return a UNIX timestamp
-   */
-  public long getCreateTimeStamp() {
-    return _record.getLongField(Attributes.CREATE_TIMESTAMP.toString(), 0L);
-  }
-
-  /**
-   * Get the value of a test field corresponding to a request count
-   * @return the number of requests
-   */
-  public String getTestField() {
-    return _record.getSimpleField("requestCountStat");
-  }
-
-  /**
-   * Set a group of heath statistics, grouped by the statistic
-   * @param healthFields a map of statistic name, the corresponding entity, and the value
-   */
-  public void setHealthFields(Map<String, Map<String, String>> healthFields) {
-    _record.setMapFields(healthFields);
-  }
-
-  /**
-   * Create a key based on a parent key, instance, and statistic
-   * @param instance the instance for which these statistics exist
-   * @param parentKey the originating key
-   * @param statName the statistic
-   * @return a unified key
-   */
-  public String buildCompositeKey(String instance, String parentKey, String statName) {
-    String delim = ExpressionParser.statFieldDelim;
-    return instance + delim + parentKey + delim + statName;
-  }
-
-  /**
-   * Get all the health statistics for a given instance
-   * @param instanceName the instance for which to get health statistics
-   * @return a map of (instance and statistic, value or timestamp, value) triples
-   */
-  public Map<String, Map<String, String>> getHealthFields(String instanceName) // ,
-                                                                               // String
-                                                                               // timestamp)
-  {
-    // XXX: need to do some conversion of input format to the format that stats
-    // computation wants
-    Map<String, Map<String, String>> currMapFields = _record.getMapFields();
-    Map<String, Map<String, String>> convertedMapFields =
-        new HashMap<String, Map<String, String>>();
-    for (String key : currMapFields.keySet()) {
-      Map<String, String> currMap = currMapFields.get(key);
-      String timestamp = _record.getStringField(StatsHolder.TIMESTAMP_NAME, "-1");
-      for (String subKey : currMap.keySet()) {
-        if (subKey.equals("StatsHolder.TIMESTAMP_NAME")) { // don't want to get timestamp again
-          continue;
-        }
-        String compositeKey = buildCompositeKey(instanceName, key, subKey);
-        String value = currMap.get(subKey);
-        Map<String, String> convertedMap = new HashMap<String, String>();
-        convertedMap.put(StatsHolder.VALUE_NAME, value);
-        convertedMap.put(StatsHolder.TIMESTAMP_NAME, timestamp);
-        convertedMapFields.put(compositeKey, convertedMap);
-      }
-    }
-    return convertedMapFields;
-  }
-
-  @Override
-  public boolean isValid() {
-    // TODO Auto-generated method stub
-    return true;
-  }
-}

http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterAlertItem.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterAlertItem.java b/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterAlertItem.java
deleted file mode 100644
index 19634e0..0000000
--- a/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterAlertItem.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package org.apache.helix.monitoring.mbeans;
-
-/*
- * 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
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Date;
-
-import org.apache.helix.alerts.AlertValueAndStatus;
-
-public class ClusterAlertItem implements ClusterAlertItemMBean {
-  String _alertItemName;
-  double _alertValue;
-  int _alertFired;
-  String _additionalInfo = "";
-  AlertValueAndStatus _valueAndStatus;
-  long _lastUpdateTime = 0;
-
-  public ClusterAlertItem(String name, AlertValueAndStatus valueAndStatus) {
-    _valueAndStatus = valueAndStatus;
-    _alertItemName = name;
-    refreshValues();
-  }
-
-  @Override
-  public String getSensorName() {
-    return _alertItemName;
-  }
-
-  @Override
-  public double getAlertValue() {
-    return _alertValue;
-  }
-
-  public void setValueMap(AlertValueAndStatus valueAndStatus) {
-    _valueAndStatus = valueAndStatus;
-    refreshValues();
-  }
-
-  void refreshValues() {
-    _lastUpdateTime = new Date().getTime();
-    if (_valueAndStatus.getValue().getElements().size() > 0) {
-      _alertValue = Double.parseDouble(_valueAndStatus.getValue().getElements().get(0));
-    } else {
-      _alertValue = 0;
-    }
-    _alertFired = _valueAndStatus.isFired() ? 1 : 0;
-  }
-
-  @Override
-  public int getAlertFired() {
-    return _alertFired;
-  }
-
-  public void setAdditionalInfo(String additionalInfo) {
-    _additionalInfo = additionalInfo;
-  }
-
-  @Override
-  public String getAdditionalInfo() {
-    return _additionalInfo;
-  }
-
-  public void reset() {
-    _alertFired = 0;
-    _additionalInfo = "";
-    _alertValue = 0;
-  }
-
-  public long getLastUpdateTime() {
-    return _lastUpdateTime;
-  }
-}

http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterAlertItemMBean.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterAlertItemMBean.java b/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterAlertItemMBean.java
deleted file mode 100644
index 573391d..0000000
--- a/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterAlertItemMBean.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.apache.helix.monitoring.mbeans;
-
-/*
- * 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
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-public interface ClusterAlertItemMBean {
-  String getSensorName();
-
-  double getAlertValue();
-
-  int getAlertFired();
-
-  String getAdditionalInfo();
-}

http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterAlertMBeanCollection.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterAlertMBeanCollection.java b/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterAlertMBeanCollection.java
deleted file mode 100644
index 0d06ca3..0000000
--- a/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterAlertMBeanCollection.java
+++ /dev/null
@@ -1,275 +0,0 @@
-package org.apache.helix.monitoring.mbeans;
-
-/*
- * 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
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.StringWriter;
-import java.lang.management.ManagementFactory;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import org.apache.helix.PropertyType;
-import org.apache.helix.ZNRecord;
-import org.apache.helix.alerts.AlertParser;
-import org.apache.helix.alerts.AlertValueAndStatus;
-import org.apache.helix.alerts.Tuple;
-import org.apache.log4j.Logger;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-
-public class ClusterAlertMBeanCollection {
-  public static String DOMAIN_ALERT = "HelixAlerts";
-  public static String ALERT_SUMMARY = "AlertSummary";
-
-  private static final Logger _logger = Logger.getLogger(ClusterAlertMBeanCollection.class);
-  ConcurrentHashMap<String, ClusterAlertItem> _alertBeans =
-      new ConcurrentHashMap<String, ClusterAlertItem>();
-
-  Map<String, String> _recentAlertDelta;
-  ClusterAlertSummary _clusterAlertSummary;
-  ZNRecord _alertHistory = new ZNRecord(PropertyType.ALERT_HISTORY.toString());
-  Set<String> _previousFiredAlerts = new HashSet<String>();
-  // 5 min for mbean freshness threshold
-  public static final long ALERT_NOCHANGE_THRESHOLD = 5 * 60 * 1000;
-
-  final MBeanServer _beanServer;
-
-  public interface ClusterAlertSummaryMBean extends ClusterAlertItemMBean {
-    public String getAlertFiredHistory();
-  }
-
-  class ClusterAlertSummary extends ClusterAlertItem implements ClusterAlertSummaryMBean {
-    public ClusterAlertSummary(String name, AlertValueAndStatus valueAndStatus) {
-      super(name, valueAndStatus);
-    }
-
-    /**
-     * Returns the previous 100 alert mbean turn on / off history
-     */
-    @Override
-    public String getAlertFiredHistory() {
-      try {
-        ObjectMapper mapper = new ObjectMapper();
-        SerializationConfig serializationConfig = mapper.getSerializationConfig();
-        serializationConfig.set(SerializationConfig.Feature.INDENT_OUTPUT, true);
-        StringWriter sw = new StringWriter();
-        mapper.writeValue(sw, _alertHistory);
-        return sw.toString();
-      } catch (Exception e) {
-        _logger.warn("", e);
-        return "";
-      }
-    }
-  }
-
-  public ClusterAlertMBeanCollection() {
-    _beanServer = ManagementFactory.getPlatformMBeanServer();
-  }
-
-  public Collection<ClusterAlertItemMBean> getCurrentAlertMBeans() {
-    ArrayList<ClusterAlertItemMBean> beans = new ArrayList<ClusterAlertItemMBean>();
-    for (ClusterAlertItem item : _alertBeans.values()) {
-      beans.add(item);
-    }
-    return beans;
-  }
-
-  void onNewAlertMbeanAdded(ClusterAlertItemMBean bean) {
-    try {
-      _logger.info("alert bean " + bean.getSensorName() + " exposed to jmx");
-      System.out.println("alert bean " + bean.getSensorName() + " exposed to jmx");
-      ObjectName objectName = new ObjectName(DOMAIN_ALERT + ":alert=" + bean.getSensorName());
-      register(bean, objectName);
-    } catch (Exception e) {
-      _logger.error("", e);
-      e.printStackTrace();
-    }
-  }
-
-  public void setAlerts(String originAlert, Map<String, AlertValueAndStatus> alertResultMap,
-      String clusterName) {
-    if (alertResultMap == null) {
-      _logger.warn("null alertResultMap");
-      return;
-    }
-    for (String alertName : alertResultMap.keySet()) {
-      String beanName = "";
-      if (alertName.length() > 1) {
-        String comparator = AlertParser.getComponent(AlertParser.COMPARATOR_NAME, originAlert);
-        String constant = AlertParser.getComponent(AlertParser.CONSTANT_NAME, originAlert);
-        beanName = "(" + alertName + ")" + comparator + "(" + constant + ")";
-      } else {
-        beanName = originAlert + "--(" + alertName + ")";
-      }
-      // This is to make JMX happy; certain charaters cannot be in JMX bean name
-      beanName = beanName.replace('*', '%').replace('=', '#').replace(',', ';');
-      if (!_alertBeans.containsKey(beanName)) {
-        ClusterAlertItem item = new ClusterAlertItem(beanName, alertResultMap.get(alertName));
-        onNewAlertMbeanAdded(item);
-        _alertBeans.put(beanName, item);
-      } else {
-        _alertBeans.get(beanName).setValueMap(alertResultMap.get(alertName));
-      }
-    }
-    refreshSummayAlert(clusterName);
-  }
-
-  public void setAlertHistory(ZNRecord alertHistory) {
-    _alertHistory = alertHistory;
-  }
-
-  /**
-   * The summary alert is a combination of all alerts, if it is on, something is wrong on this
-   * cluster. The additional info contains all alert mbean names that has been fired.
-   */
-  void refreshSummayAlert(String clusterName) {
-    boolean fired = false;
-    String alertsFired = "";
-    String summaryKey = ALERT_SUMMARY + "_" + clusterName;
-    for (String key : _alertBeans.keySet()) {
-      if (!key.equals(summaryKey)) {
-        ClusterAlertItem item = _alertBeans.get(key);
-        fired = (item.getAlertFired() == 1) | fired;
-        if (item.getAlertFired() == 1) {
-          alertsFired += item._alertItemName;
-          alertsFired += ";";
-        }
-      }
-    }
-    Tuple<String> t = new Tuple<String>();
-    t.add("0");
-    AlertValueAndStatus summaryStatus = new AlertValueAndStatus(t, fired);
-    if (!_alertBeans.containsKey(summaryKey)) {
-      ClusterAlertSummary item = new ClusterAlertSummary(summaryKey, summaryStatus);
-      onNewAlertMbeanAdded(item);
-      item.setAdditionalInfo(alertsFired);
-      _alertBeans.put(summaryKey, item);
-      _clusterAlertSummary = item;
-    } else {
-      _alertBeans.get(summaryKey).setValueMap(summaryStatus);
-      _alertBeans.get(summaryKey).setAdditionalInfo(alertsFired);
-    }
-  }
-
-  void register(Object bean, ObjectName name) {
-    try {
-      _beanServer.unregisterMBean(name);
-    } catch (Exception e) {
-    }
-    try {
-      _beanServer.registerMBean(bean, name);
-    } catch (Exception e) {
-      _logger.error("Could not register MBean", e);
-    }
-  }
-
-  public void reset() {
-    for (String beanName : _alertBeans.keySet()) {
-      ClusterAlertItem item = _alertBeans.get(beanName);
-      item.reset();
-      try {
-        ObjectName objectName = new ObjectName(DOMAIN_ALERT + ":alert=" + item.getSensorName());
-        _beanServer.unregisterMBean(objectName);
-      } catch (Exception e) {
-        _logger.warn("", e);
-      }
-    }
-    _alertBeans.clear();
-  }
-
-  public void refreshAlertDelta(String clusterName) {
-    // Update the alert turn on/turn off history
-    String summaryKey = ALERT_SUMMARY + "_" + clusterName;
-    Set<String> currentFiredAlerts = new HashSet<String>();
-    for (String key : _alertBeans.keySet()) {
-      if (!key.equals(summaryKey)) {
-        ClusterAlertItem item = _alertBeans.get(key);
-        if (item.getAlertFired() == 1) {
-          currentFiredAlerts.add(item._alertItemName);
-        }
-      }
-    }
-
-    Map<String, String> onOffAlertsMap = new HashMap<String, String>();
-    for (String alertName : currentFiredAlerts) {
-      if (!_previousFiredAlerts.contains(alertName)) {
-        onOffAlertsMap.put(alertName, "ON");
-        _logger.info(alertName + " ON");
-        _previousFiredAlerts.add(alertName);
-      }
-    }
-    for (String cachedAlert : _previousFiredAlerts) {
-      if (!currentFiredAlerts.contains(cachedAlert)) {
-        onOffAlertsMap.put(cachedAlert, "OFF");
-        _logger.info(cachedAlert + " OFF");
-      }
-    }
-    for (String key : onOffAlertsMap.keySet()) {
-      if (onOffAlertsMap.get(key).equals("OFF")) {
-        _previousFiredAlerts.remove(key);
-      }
-    }
-    if (onOffAlertsMap.size() == 0) {
-      _logger.info("No MBean change");
-    }
-    _recentAlertDelta = onOffAlertsMap;
-
-    checkMBeanFreshness(ALERT_NOCHANGE_THRESHOLD);
-  }
-
-  public Map<String, String> getRecentAlertDelta() {
-    return _recentAlertDelta;
-  }
-
-  /**
-   * Remove mbeans that has not been changed for thresholdInMs MS
-   */
-  void checkMBeanFreshness(long thresholdInMs) {
-    long now = new Date().getTime();
-    Set<String> oldBeanNames = new HashSet<String>();
-    // Get mbean items that has not been updated for thresholdInMs
-    for (String beanName : _alertBeans.keySet()) {
-      ClusterAlertItem item = _alertBeans.get(beanName);
-      if (now - item.getLastUpdateTime() > thresholdInMs) {
-        oldBeanNames.add(beanName);
-        _logger.info("bean " + beanName + " has not been updated for " + thresholdInMs + " MS");
-      }
-    }
-    for (String beanName : oldBeanNames) {
-      ClusterAlertItem item = _alertBeans.get(beanName);
-      _alertBeans.remove(beanName);
-      try {
-        item.reset();
-        ObjectName objectName = new ObjectName(DOMAIN_ALERT + ":alert=" + item.getSensorName());
-        _beanServer.unregisterMBean(objectName);
-      } catch (Exception e) {
-        _logger.warn("", e);
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/task/TaskDriver.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/task/TaskDriver.java b/helix-core/src/main/java/org/apache/helix/task/TaskDriver.java
index ada2f99..1ec6848 100644
--- a/helix-core/src/main/java/org/apache/helix/task/TaskDriver.java
+++ b/helix-core/src/main/java/org/apache/helix/task/TaskDriver.java
@@ -46,7 +46,7 @@ import org.apache.helix.model.IdealState;
 import org.apache.helix.model.builder.CustomModeISBuilder;
 import org.apache.log4j.Logger;
 
-import com.beust.jcommander.internal.Lists;
+import com.google.common.collect.Lists;
 
 /**
  * CLI for scheduling/canceling workflows

http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/tools/ClusterSetup.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/tools/ClusterSetup.java b/helix-core/src/main/java/org/apache/helix/tools/ClusterSetup.java
index 2131c3c..10c8633 100644
--- a/helix-core/src/main/java/org/apache/helix/tools/ClusterSetup.java
+++ b/helix-core/src/main/java/org/apache/helix/tools/ClusterSetup.java
@@ -117,12 +117,6 @@ public class ClusterSetup {
   // help
   public static final String help = "help";
 
-  // stats/alerts
-  public static final String addStat = "addStat";
-  public static final String addAlert = "addAlert";
-  public static final String dropStat = "dropStat";
-  public static final String dropAlert = "dropAlert";
-
   // get/set/remove configs
   public static final String getConfig = "getConfig";
   public static final String setConfig = "setConfig";
@@ -848,17 +842,6 @@ public class ClusterSetup {
     listStateModelOption.setRequired(false);
     listStateModelOption.setArgName("clusterName stateModelName");
 
-    Option addStatOption =
-        OptionBuilder.withLongOpt(addStat).withDescription("Add a persistent stat").create();
-    addStatOption.setArgs(2);
-    addStatOption.setRequired(false);
-    addStatOption.setArgName("clusterName statName");
-    Option addAlertOption =
-        OptionBuilder.withLongOpt(addAlert).withDescription("Add an alert").create();
-    addAlertOption.setArgs(2);
-    addAlertOption.setRequired(false);
-    addAlertOption.setArgName("clusterName alertName");
-
     Option addInstanceTagOption =
         OptionBuilder.withLongOpt(addInstanceTag).withDescription("Add a tag to instance").create();
     addInstanceTagOption.setArgs(3);
@@ -871,17 +854,6 @@ public class ClusterSetup {
     removeInstanceTagOption.setRequired(false);
     removeInstanceTagOption.setArgName("clusterName instanceName tag");
 
-    Option dropStatOption =
-        OptionBuilder.withLongOpt(dropStat).withDescription("Drop a persistent stat").create();
-    dropStatOption.setArgs(2);
-    dropStatOption.setRequired(false);
-    dropStatOption.setArgName("clusterName statName");
-    Option dropAlertOption =
-        OptionBuilder.withLongOpt(dropAlert).withDescription("Drop an alert").create();
-    dropAlertOption.setArgs(2);
-    dropAlertOption.setRequired(false);
-    dropAlertOption.setArgName("clusterName alertName");
-
     // TODO need deal with resource-names containing ","
     // set/get/remove configs options
     Option setConfOption =
@@ -966,10 +938,6 @@ public class ClusterSetup {
     group.addOption(addStateModelDefOption);
     group.addOption(listStateModelsOption);
     group.addOption(listStateModelOption);
-    group.addOption(addStatOption);
-    group.addOption(addAlertOption);
-    group.addOption(dropStatOption);
-    group.addOption(dropAlertOption);
     group.addOption(addResourcePropertyOption);
     group.addOption(removeResourcePropertyOption);
 
@@ -1340,26 +1308,6 @@ public class ClusterSetup {
 
       setupTool.addIdealState(clusterName, resourceName, idealStateFile);
       return 0;
-    } else if (cmd.hasOption(addStat)) {
-      String clusterName = cmd.getOptionValues(addStat)[0];
-      String statName = cmd.getOptionValues(addStat)[1];
-
-      setupTool.getClusterManagementTool().addStat(clusterName, statName);
-    } else if (cmd.hasOption(addAlert)) {
-      String clusterName = cmd.getOptionValues(addAlert)[0];
-      String alertName = cmd.getOptionValues(addAlert)[1];
-
-      setupTool.getClusterManagementTool().addAlert(clusterName, alertName);
-    } else if (cmd.hasOption(dropStat)) {
-      String clusterName = cmd.getOptionValues(dropStat)[0];
-      String statName = cmd.getOptionValues(dropStat)[1];
-
-      setupTool.getClusterManagementTool().dropStat(clusterName, statName);
-    } else if (cmd.hasOption(dropAlert)) {
-      String clusterName = cmd.getOptionValues(dropAlert)[0];
-      String alertName = cmd.getOptionValues(dropAlert)[1];
-
-      setupTool.getClusterManagementTool().dropAlert(clusterName, alertName);
     } else if (cmd.hasOption(dropResource)) {
       String clusterName = cmd.getOptionValues(dropResource)[0];
       String resourceName = cmd.getOptionValues(dropResource)[1];

http://git-wip-us.apache.org/repos/asf/helix/blob/77cc6516/helix-core/src/main/java/org/apache/helix/util/HelixUtil.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/util/HelixUtil.java b/helix-core/src/main/java/org/apache/helix/util/HelixUtil.java
index 82d7b6c..a4e0e08 100644
--- a/helix-core/src/main/java/org/apache/helix/util/HelixUtil.java
+++ b/helix-core/src/main/java/org/apache/helix/util/HelixUtil.java
@@ -112,22 +112,6 @@ public final class HelixUtil {
     return getInstancePropertyPath(clusterName, instanceName, PropertyType.STATUSUPDATES);
   }
 
-  public static String getHealthPath(String clusterName, String instanceName) {
-    return PropertyPathConfig.getPath(PropertyType.HEALTHREPORT, clusterName, instanceName);
-  }
-
-  public static String getPersistentStatsPath(String clusterName) {
-    return PropertyPathConfig.getPath(PropertyType.PERSISTENTSTATS, clusterName);
-  }
-
-  public static String getAlertsPath(String clusterName) {
-    return PropertyPathConfig.getPath(PropertyType.ALERTS, clusterName);
-  }
-
-  public static String getAlertStatusPath(String clusterName) {
-    return PropertyPathConfig.getPath(PropertyType.ALERT_STATUS, clusterName);
-  }
-
   public static String getInstanceNameFromPath(String path) {
     // path structure
     // /<cluster_name>/instances/<instance_name>/[currentStates/messages]


Mime
View raw message