helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zzh...@apache.org
Subject [5/7] [HELIX-395] Remove old Helix alert/stat modules
Date Tue, 04 Mar 2014 19:04:52 GMT
http://git-wip-us.apache.org/repos/asf/helix/blob/db4c10a2/helix-core/src/main/java/org/apache/helix/healthcheck/AggregationTypeFactory.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/healthcheck/AggregationTypeFactory.java b/helix-core/src/main/java/org/apache/helix/healthcheck/AggregationTypeFactory.java
deleted file mode 100644
index d946641..0000000
--- a/helix-core/src/main/java/org/apache/helix/healthcheck/AggregationTypeFactory.java
+++ /dev/null
@@ -1,69 +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.StringTokenizer;
-
-import org.apache.log4j.Logger;
-
-public class AggregationTypeFactory {
-  private static final Logger logger = Logger.getLogger(AggregationTypeFactory.class);
-
-  public AggregationTypeFactory() {
-  }
-
-  // TODO: modify this function so that it takes a single string, but can parse
-  // apart params from type
-  public static AggregationType getAggregationType(String input) {
-    if (input == null) {
-      logger.error("AggregationType name is null");
-      return null;
-    }
-    StringTokenizer tok = new StringTokenizer(input, AggregationType.DELIM);
-    String type = tok.nextToken();
-    int numParams = tok.countTokens();
-    String[] params = new String[numParams];
-    for (int i = 0; i < numParams; i++) {
-      if (!tok.hasMoreTokens()) {
-        logger.error("Trying to parse non-existent params");
-        return null;
-      }
-      params[i] = tok.nextToken();
-    }
-
-    if (type.equals(AccumulateAggregationType.TYPE_NAME)) {
-      return new AccumulateAggregationType();
-    } else if (type.equals(DecayAggregationType.TYPE_NAME)) {
-      if (params.length < 1) {
-        logger.error("DecayAggregationType must contain <decay weight> parameter");
-        return null;
-      }
-      return new DecayAggregationType(Double.parseDouble(params[0]));
-    } else if (type.equals(WindowAggregationType.TYPE_NAME)) {
-      if (params.length < 1) {
-        logger.error("WindowAggregationType must contain <window size> parameter");
-      }
-      return new WindowAggregationType(Integer.parseInt(params[0]));
-    } else {
-      logger.error("Unknown AggregationType " + type);
-      return null;
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/helix/blob/db4c10a2/helix-core/src/main/java/org/apache/helix/healthcheck/DecayAggregationType.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/healthcheck/DecayAggregationType.java b/helix-core/src/main/java/org/apache/helix/healthcheck/DecayAggregationType.java
deleted file mode 100644
index c3252e9..0000000
--- a/helix-core/src/main/java/org/apache/helix/healthcheck/DecayAggregationType.java
+++ /dev/null
@@ -1,58 +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 DecayAggregationType implements AggregationType {
-
-  private static final Logger logger = Logger.getLogger(DecayAggregationType.class);
-
-  public final static String TYPE_NAME = "decay";
-
-  double _decayFactor = 0.1;
-
-  public DecayAggregationType(double df) {
-    super();
-    _decayFactor = df;
-  }
-
-  @Override
-  public String getName() {
-    StringBuilder sb = new StringBuilder();
-    sb.append(TYPE_NAME);
-    sb.append(DELIM);
-    sb.append(_decayFactor);
-    return sb.toString();
-  }
-
-  @Override
-  public String merge(String iv, String ev, long prevTimestamp) {
-    double incomingVal = Double.parseDouble(iv);
-    double existingVal = Double.parseDouble(ev);
-    long currTimestamp = System.currentTimeMillis();
-    double minutesOld = (currTimestamp - prevTimestamp) / 60000.0;
-    // come up with decay coeff for old value. More time passed, the more it
-    // decays
-    double oldDecayCoeff = Math.pow((1 - _decayFactor), minutesOld);
-    return String
-        .valueOf((oldDecayCoeff * existingVal + (1 - oldDecayCoeff) * incomingVal));
-  }
-}

http://git-wip-us.apache.org/repos/asf/helix/blob/db4c10a2/helix-core/src/main/java/org/apache/helix/healthcheck/DefaultHealthReportProvider.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/healthcheck/DefaultHealthReportProvider.java b/helix-core/src/main/java/org/apache/helix/healthcheck/DefaultHealthReportProvider.java
deleted file mode 100644
index 619667c..0000000
--- a/helix-core/src/main/java/org/apache/helix/healthcheck/DefaultHealthReportProvider.java
+++ /dev/null
@@ -1,86 +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.lang.management.ManagementFactory;
-import java.lang.management.OperatingSystemMXBean;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.apache.log4j.Logger;
-
-class DefaultHealthReportProvider extends HealthReportProvider {
-  private static final Logger _logger = Logger.getLogger(DefaultHealthReportProvider.class);
-
-  public final static String _availableCPUs = "availableCPUs";
-  public final static String _freePhysicalMemory = "freePhysicalMemory";
-  public final static String _totalJvmMemory = "totalJvmMemory";
-  public final static String _freeJvmMemory = "freeJvmMemory";
-  public final static String _averageSystemLoad = "averageSystemLoad";
-
-  public DefaultHealthReportProvider() {
-  }
-
-  @Override
-  public Map<String, String> getRecentHealthReport() {
-    OperatingSystemMXBean osMxBean = ManagementFactory.getOperatingSystemMXBean();
-    long freeJvmMemory = Runtime.getRuntime().freeMemory();
-    long totalJvmMemory = Runtime.getRuntime().totalMemory();
-    int availableCPUs = osMxBean.getAvailableProcessors();
-    double avgSystemLoad = osMxBean.getSystemLoadAverage();
-    long freePhysicalMemory = Long.MAX_VALUE;
-
-    try {
-      // if( osMxBean instanceof com.sun.management.OperatingSystemMXBean)
-      // {
-      // com.sun.management.OperatingSystemMXBean sunOsMxBean
-      // = (com.sun.management.OperatingSystemMXBean) osMxBean;
-      // freePhysicalMemory = sunOsMxBean.getFreePhysicalMemorySize();
-      // }
-    } catch (Throwable t) {
-      _logger.error(t);
-    }
-
-    Map<String, String> result = new TreeMap<String, String>();
-
-    result.put(_availableCPUs, "" + availableCPUs);
-    result.put(_freePhysicalMemory, "" + freePhysicalMemory);
-    result.put(_freeJvmMemory, "" + freeJvmMemory);
-    result.put(_totalJvmMemory, "" + totalJvmMemory);
-    result.put(_averageSystemLoad, "" + avgSystemLoad);
-
-    return result;
-  }
-
-  @Override
-  public Map<String, Map<String, String>> getRecentPartitionHealthReport() {
-    Map<String, Map<String, String>> result = new HashMap<String, Map<String, String>>();
-
-    result.put(getReportName(), getRecentHealthReport());
-    return result;
-  }
-
-  @Override
-  public void resetStats() {
-    // TODO Auto-generated method stub
-
-  }
-}

http://git-wip-us.apache.org/repos/asf/helix/blob/db4c10a2/helix-core/src/main/java/org/apache/helix/healthcheck/DefaultPerfCounters.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/healthcheck/DefaultPerfCounters.java b/helix-core/src/main/java/org/apache/helix/healthcheck/DefaultPerfCounters.java
deleted file mode 100644
index e1afd5c..0000000
--- a/helix-core/src/main/java/org/apache/helix/healthcheck/DefaultPerfCounters.java
+++ /dev/null
@@ -1,95 +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.Date;
-
-import org.apache.helix.ZNRecord;
-import org.apache.log4j.Logger;
-
-@Deprecated
-public class DefaultPerfCounters extends ZNRecord {
-  private static final Logger _logger = Logger.getLogger(DefaultPerfCounters.class);
-
-  public final static String _availableCPUs = "availableCPUs";
-  public final static String _freePhysicalMemory = "freePhysicalMemory";
-  public final static String _totalJvmMemory = "totalJvmMemory";
-  public final static String _freeJvmMemory = "freeJvmMemory";
-  public final static String _averageSystemLoad = "averageSystemLoad";
-
-  public DefaultPerfCounters(String instanceName, long availableCPUs, long freePhysicalMemory,
-      long freeJvmMemory, long totalJvmMemory, double averageSystemLoad) {
-    super("DefaultPerfCounters");
-    setSimpleField("instanceName", instanceName);
-    setSimpleField("createTime", new Date().toString());
-
-    setSimpleField(_availableCPUs, "" + availableCPUs);
-    setSimpleField(_freePhysicalMemory, "" + freePhysicalMemory);
-    setSimpleField(_freeJvmMemory, "" + freeJvmMemory);
-    setSimpleField(_totalJvmMemory, "" + totalJvmMemory);
-    setSimpleField(_averageSystemLoad, "" + averageSystemLoad);
-  }
-
-  public long getAvailableCpus() {
-    return getSimpleLongVal(_availableCPUs);
-  }
-
-  public double getAverageSystemLoad() {
-    return getSimpleDoubleVal(_averageSystemLoad);
-  }
-
-  public long getTotalJvmMemory() {
-    return getSimpleLongVal(_totalJvmMemory);
-  }
-
-  public long getFreeJvmMemory() {
-    return getSimpleLongVal(_freeJvmMemory);
-  }
-
-  public long getFreePhysicalMemory() {
-    return getSimpleLongVal(_freePhysicalMemory);
-  }
-
-  long getSimpleLongVal(String key) {
-    String strVal = getSimpleField(key);
-    if (strVal == null) {
-      return 0;
-    }
-    try {
-      return Long.parseLong(strVal);
-    } catch (Exception e) {
-      _logger.warn(e);
-      return 0;
-    }
-  }
-
-  double getSimpleDoubleVal(String key) {
-    String strVal = getSimpleField(key);
-    if (strVal == null) {
-      return 0;
-    }
-    try {
-      return Double.parseDouble(strVal);
-    } catch (Exception e) {
-      _logger.warn(e);
-      return 0;
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/helix/blob/db4c10a2/helix-core/src/main/java/org/apache/helix/healthcheck/HealthReportProvider.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/healthcheck/HealthReportProvider.java b/helix-core/src/main/java/org/apache/helix/healthcheck/HealthReportProvider.java
deleted file mode 100644
index f7afd04..0000000
--- a/helix-core/src/main/java/org/apache/helix/healthcheck/HealthReportProvider.java
+++ /dev/null
@@ -1,39 +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.Map;
-
-public abstract class HealthReportProvider {
-  public static final String _defaultPerfCounters = "defaultPerfCounters";
-
-  public abstract Map<String, String> getRecentHealthReport();
-
-  public Map<String, Map<String, String>> getRecentPartitionHealthReport() {
-    return null;
-  }
-
-  public abstract void resetStats();
-
-  public String getReportName() {
-    return _defaultPerfCounters;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/helix/blob/db4c10a2/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/db4c10a2/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/db4c10a2/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/db4c10a2/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 9023641..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.PropertyKey.Builder;
-import org.apache.helix.ZNRecord;
-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/db4c10a2/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/db4c10a2/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 6bc33d3..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 / 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/db4c10a2/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 e675792..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 java.util.Map;
-
-import org.apache.log4j.Logger;
-
-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/db4c10a2/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 82b2d31..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 java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.log4j.Logger;
-
-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/db4c10a2/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/db4c10a2/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/db4c10a2/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 b844926..24ccc02 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;
@@ -59,7 +58,6 @@ 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;
@@ -209,17 +207,7 @@ 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();
       if (logger.isInfoEnabled()) {
         logger.info(Thread.currentThread().getId() + " END:INVOKE " + _path + " listener:"

http://git-wip-us.apache.org/repos/asf/helix/blob/db4c10a2/helix-core/src/main/java/org/apache/helix/manager/zk/HelixConnectionAdaptor.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/HelixConnectionAdaptor.java b/helix-core/src/main/java/org/apache/helix/manager/zk/HelixConnectionAdaptor.java
index a2f6d9e..10a55ff 100644
--- a/helix-core/src/main/java/org/apache/helix/manager/zk/HelixConnectionAdaptor.java
+++ b/helix-core/src/main/java/org/apache/helix/manager/zk/HelixConnectionAdaptor.java
@@ -25,7 +25,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.HelixAutoController;
 import org.apache.helix.HelixConnection;
@@ -49,9 +48,7 @@ import org.apache.helix.api.id.ClusterId;
 import org.apache.helix.api.id.Id;
 import org.apache.helix.api.id.ParticipantId;
 import org.apache.helix.api.id.SessionId;
-import org.apache.helix.healthcheck.ParticipantHealthReportCollector;
 import org.apache.helix.model.HelixConfigScope.ConfigScopeProperty;
-import org.apache.helix.monitoring.MonitoringServer;
 import org.apache.helix.participant.StateMachineEngine;
 import org.apache.helix.store.zk.ZkHelixPropertyStore;
 import org.apache.log4j.Logger;
@@ -137,13 +134,6 @@ public class HelixConnectionAdaptor implements HelixManager {
   }
 
   @Override
-  public void addHealthStateChangeListener(HealthStateChangeListener listener, String instanceName)
-      throws Exception {
-    _connection.addHealthStateChangeListener(_role, listener, _clusterId,
-        ParticipantId.from(instanceName));
-  }
-
-  @Override
   public void addExternalViewChangeListener(ExternalViewChangeListener listener) throws Exception {
     _connection.addExternalViewChangeListener(_role, listener, _clusterId);
   }
@@ -204,11 +194,6 @@ public class HelixConnectionAdaptor implements HelixManager {
   }
 
   @Override
-  public ParticipantHealthReportCollector getHealthReportCollector() {
-    throw new UnsupportedOperationException();
-  }
-
-  @Override
   public InstanceType getInstanceType() {
     return _instanceType;
   }

http://git-wip-us.apache.org/repos/asf/helix/blob/db4c10a2/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 da266f9..b6d231f 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
@@ -278,15 +278,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/db4c10a2/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 5aae1f7..7223c0a 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,8 +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.api.State;
 import org.apache.helix.api.id.ConstraintId;
 import org.apache.helix.api.id.MessageId;
@@ -62,7 +60,6 @@ import org.apache.helix.api.id.SessionId;
 import org.apache.helix.api.id.StateModelDefId;
 import org.apache.helix.api.id.StateModelFactoryId;
 import org.apache.helix.controller.strategy.DefaultTwoStateStrategy;
-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;
@@ -79,7 +76,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.util.HelixUtil;
 import org.apache.helix.util.RebalanceUtil;
@@ -758,79 +754,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 =
@@ -851,70 +774,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/db4c10a2/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 b7b3381..c89abd2 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.HelixConstants.ChangeType;
 import org.apache.helix.HelixDataAccessor;
@@ -57,17 +56,9 @@ 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.HelixConfigScope.ConfigScopeProperty;
 import org.apache.helix.model.Leader;
-import org.apache.helix.model.LiveInstance;
-import org.apache.helix.model.MonitoringConfig;
-import org.apache.helix.monitoring.MonitoringServer;
 import org.apache.helix.monitoring.ZKPathDataDumpTask;
 import org.apache.helix.participant.HelixStateMachineEngine;
 import org.apache.helix.participant.StateMachineEngine;
@@ -123,7 +114,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 +210,21 @@ 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 +396,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[] {
@@ -653,12 +621,6 @@ public class ZKHelixManager implements HelixManager, IZkStateListener {
   }
 
   @Override
-  public ParticipantHealthReportCollector getHealthReportCollector() {
-    checkConnected();
-    return _participantHealthInfoCollector;
-  }
-
-  @Override
   public InstanceType getInstanceType() {
     return _instanceType;
   }
@@ -883,10 +845,6 @@ public class ZKHelixManager implements HelixManager, IZkStateListener {
      */
     participantHelper.setupMsgHandler();
 
-    /**
-     * start health check timer task
-     */
-    participantHelper.createHealthCheckPath();
   }
 
   void handleNewSessionAsController() {

http://git-wip-us.apache.org/repos/asf/helix/blob/db4c10a2/helix-core/src/main/java/org/apache/helix/manager/zk/ZkCallbackHandler.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/ZkCallbackHandler.java b/helix-core/src/main/java/org/apache/helix/manager/zk/ZkCallbackHandler.java
index e0a0b33..86d390a 100644
--- a/helix-core/src/main/java/org/apache/helix/manager/zk/ZkCallbackHandler.java
+++ b/helix-core/src/main/java/org/apache/helix/manager/zk/ZkCallbackHandler.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.HelixConnection;
 import org.apache.helix.HelixConstants.ChangeType;
 import org.apache.helix.HelixDataAccessor;
@@ -61,7 +60,6 @@ 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;
@@ -231,15 +229,6 @@ public class ZkCallbackHandler 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/db4c10a2/helix-core/src/main/java/org/apache/helix/manager/zk/ZkHelixConnection.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/ZkHelixConnection.java b/helix-core/src/main/java/org/apache/helix/manager/zk/ZkHelixConnection.java
index d0aa2c7..bbe8afe 100644
--- a/helix-core/src/main/java/org/apache/helix/manager/zk/ZkHelixConnection.java
+++ b/helix-core/src/main/java/org/apache/helix/manager/zk/ZkHelixConnection.java
@@ -39,7 +39,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.HelixAutoController;
 import org.apache.helix.HelixConstants.ChangeType;
@@ -106,8 +105,6 @@ public class ZkHelixConnection implements HelixConnection, IZkStateListener {
    * helix version#
    */
   final String _version;
-  
-  private MonitoringClient _monitoringClient;
 
   public ZkHelixConnection(String zkAddr) {
     _zkAddr = zkAddr;
@@ -130,7 +127,6 @@ public class ZkHelixConnection implements HelixConnection, IZkStateListener {
     _properties = new HelixManagerProperties("cluster-manager-version.properties");
     _version = _properties.getVersion();
 
-    _monitoringClient = null;
   }
 
   private int getSystemPropertyAsInt(String propertyKey, int propertyDefaultValue) {
@@ -380,17 +376,6 @@ public class ZkHelixConnection implements HelixConnection, IZkStateListener {
   }
 
   @Override
-  public void addHealthStateChangeListener(HelixRole role, HealthStateChangeListener listener,
-      ClusterId clusterId, ParticipantId participantId) {
-    addListener(role, listener,
-        new PropertyKey.Builder(clusterId.stringify()).healthReports(participantId.stringify()),
-        ChangeType.HEALTH,
-        new EventType[] {
-            EventType.NodeChildrenChanged, EventType.NodeDeleted, EventType.NodeCreated
-        });
-  }
-
-  @Override
   public void addExternalViewChangeListener(HelixRole role, ExternalViewChangeListener listener,
       ClusterId clusterId) {
     addListener(role, listener, new PropertyKey.Builder(clusterId.stringify()).externalViews(),

http://git-wip-us.apache.org/repos/asf/helix/blob/db4c10a2/helix-core/src/main/java/org/apache/helix/manager/zk/ZkHelixController.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/ZkHelixController.java b/helix-core/src/main/java/org/apache/helix/manager/zk/ZkHelixController.java
index 75d15b9..7bbd490 100644
--- a/helix-core/src/main/java/org/apache/helix/manager/zk/ZkHelixController.java
+++ b/helix-core/src/main/java/org/apache/helix/manager/zk/ZkHelixController.java
@@ -37,8 +37,6 @@ import org.apache.helix.api.id.ClusterId;
 import org.apache.helix.api.id.ControllerId;
 import org.apache.helix.api.id.Id;
 import org.apache.helix.controller.GenericHelixController;
-import org.apache.helix.healthcheck.HealthStatsAggregationTask;
-import org.apache.helix.healthcheck.HealthStatsAggregator;
 import org.apache.helix.messaging.DefaultMessagingService;
 import org.apache.helix.messaging.handling.MessageHandlerFactory;
 import org.apache.helix.model.Leader;
@@ -76,7 +74,6 @@ public class ZkHelixController implements HelixController {
     _manager = new HelixConnectionAdaptor(this);
     _leaderElection = new ZkHelixLeaderElection(this, _pipeline);
 
-    _timerTasks.add(new HealthStatsAggregationTask(new HealthStatsAggregator(_manager)));
     _timerTasks.add(new StatusDumpTask(clusterId, _manager.getHelixDataAccessor()));
 
   }

http://git-wip-us.apache.org/repos/asf/helix/blob/db4c10a2/helix-core/src/main/java/org/apache/helix/manager/zk/ZkHelixParticipant.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/ZkHelixParticipant.java b/helix-core/src/main/java/org/apache/helix/manager/zk/ZkHelixParticipant.java
index 56e4be8..6bb33c0 100644
--- a/helix-core/src/main/java/org/apache/helix/manager/zk/ZkHelixParticipant.java
+++ b/helix-core/src/main/java/org/apache/helix/manager/zk/ZkHelixParticipant.java
@@ -45,8 +45,6 @@ import org.apache.helix.api.config.ParticipantConfig;
 import org.apache.helix.api.id.ClusterId;
 import org.apache.helix.api.id.Id;
 import org.apache.helix.api.id.ParticipantId;
-import org.apache.helix.healthcheck.ParticipantHealthReportCollectorImpl;
-import org.apache.helix.healthcheck.ParticipantHealthReportTask;
 import org.apache.helix.messaging.DefaultMessagingService;
 import org.apache.helix.model.CurrentState;
 import org.apache.helix.model.HelixConfigScope;
@@ -76,7 +74,6 @@ public class ZkHelixParticipant implements HelixParticipant {
   final DefaultMessagingService _messagingService;
   final List<PreConnectCallback> _preConnectCallbacks;
   final List<HelixTimerTask> _timerTasks;
-  final ParticipantHealthReportCollectorImpl _participantHealthInfoCollector;
 
   /**
    * state-transition message handler factory for helix-participant
@@ -103,11 +100,6 @@ public class ZkHelixParticipant implements HelixParticipant {
     _stateMachineEngine = new HelixStateMachineEngine(manager);
     _preConnectCallbacks = new ArrayList<PreConnectCallback>();
     _timerTasks = new ArrayList<HelixTimerTask>();
-    _participantHealthInfoCollector =
-        new ParticipantHealthReportCollectorImpl(manager, participantId.stringify());
-
-    _timerTasks.add(new ParticipantHealthReportTask(_participantHealthInfoCollector));
-
   }
 
   @Override
@@ -362,17 +354,6 @@ public class ZkHelixParticipant implements HelixParticipant {
         DefaultSchedulerMessageHandlerFactory.SCHEDULER_TASK_QUEUE, stStateModelFactory);
   }
 
-  /**
-   * create zk path for health check info
-   * TODO move it to cluster-setup
-   */
-  private void createHealthCheckPath() {
-    PropertyKey healthCheckInfoKey = _keyBuilder.healthReports(_participantId.stringify());
-    if (_accessor.createProperty(healthCheckInfoKey, null)) {
-      LOG.info("Created healthcheck info path: " + healthCheckInfoKey.getPath());
-    }
-  }
-
   void init() {
     /**
      * from here on, we are dealing with new session
@@ -404,7 +385,6 @@ public class ZkHelixParticipant implements HelixParticipant {
     /**
      * start health check timer task
      */
-    createHealthCheckPath();
     startTimerTasks();
 
     /**

http://git-wip-us.apache.org/repos/asf/helix/blob/db4c10a2/helix-core/src/main/java/org/apache/helix/model/AlertHistory.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/model/AlertHistory.java b/helix-core/src/main/java/org/apache/helix/model/AlertHistory.java
deleted file mode 100644
index 58db71d..0000000
--- a/helix-core/src/main/java/org/apache/helix/model/AlertHistory.java
+++ /dev/null
@@ -1,44 +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 org.apache.helix.HelixProperty;
-import org.apache.helix.ZNRecord;
-
-/**
- * Maintains a history of alerts that have been fired, as well as actions taken, if any.
- */
-public class AlertHistory extends HelixProperty {
-
-  /**
-   * Instantiate the alert history with a pre-populated record
-   * @param record ZNRecord representing the alert history
-   */
-  public AlertHistory(ZNRecord record) {
-    super(record);
-    // TODO Auto-generated constructor stub
-  }
-
-  @Override
-  public boolean isValid() {
-    // TODO Auto-generated method stub
-    return true;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/helix/blob/db4c10a2/helix-core/src/main/java/org/apache/helix/model/AlertStatus.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/model/AlertStatus.java b/helix-core/src/main/java/org/apache/helix/model/AlertStatus.java
deleted file mode 100644
index d5ee44c..0000000
--- a/helix-core/src/main/java/org/apache/helix/model/AlertStatus.java
+++ /dev/null
@@ -1,131 +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.Map;
-
-import org.apache.helix.HelixProperty;
-import org.apache.helix.ZNRecord;
-import org.apache.helix.api.id.SessionId;
-import org.apache.helix.model.Alerts.AlertsProperty;
-
-/**
- * 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
-   * @param id identifier representing this group of alert statuses
-   */
-  public AlertStatus(String id) {
-    super(id);
-  }
-
-  /**
-   * Instantiate with a pre-populated record corresponding to alert status
-   * @param record ZNRecord representing alert statuses
-   */
-  public AlertStatus(ZNRecord record) {
-    // _record = record;
-    super(record);
-
-  }
-
-  /*
-   * public Alerts(ZNRecord record, Stat stat) { super(record, stat); }
-   */
-
-  /**
-   * Set the session that these alerts correspond to
-   * @param sessionId session for which to look up alerts
-   */
-  public void setSessionId(String sessionId) {
-    _record.setSimpleField(AlertsProperty.SESSION_ID.toString(), sessionId);
-  }
-
-  /**
-   * Set the session that the alerts correspond to
-   * @param sessionId the session for which alerts occurred
-   */
-  public void setSessionId(SessionId sessionId) {
-    if (sessionId != null) {
-      setSessionId(sessionId.stringify());
-    }
-  }
-
-  /**
-   * Get the session that these alerts correspond to
-   * @return session identifier
-   */
-  public String getSessionId() {
-    return _record.getSimpleField(AlertsProperty.SESSION_ID.toString());
-  }
-
-  /**
-   * Get the session that the alerts correspond to
-   * @return session identifier
-   */
-  public SessionId getTypedSessionId() {
-    return SessionId.from(getSessionId());
-  }
-
-  /**
-   * Get the instance that these alerts correspond to
-   * @return name of the instance
-   */
-  public String getInstanceName() {
-    return _record.getId();
-  }
-
-  /*
-   * public String getVersion() { return
-   * _record.getSimpleField(AlertsProperty.CLUSTER_MANAGER_VERSION.toString()); }
-   */
-
-  /**
-   * Get the properties of all alerts, such as if they were fired
-   * @return all alert statuses as a Map of alert to the status properties
-   */
-  public Map<String, Map<String, String>> getMapFields() {
-    return _record.getMapFields();
-  }
-
-  /**
-   * Get the statistics of a single alert
-   * @param statName Name of the alert
-   * @return alert statistics as a map of name, value pairs
-   */
-  public Map<String, String> getStatFields(String statName) {
-    return _record.getMapField(statName);
-  }
-
-  @Override
-  public boolean isValid() {
-    // TODO Auto-generated method stub
-    return true;
-  }
-}


Mime
View raw message