You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eagle.apache.org by jj...@apache.org on 2017/02/22 06:28:52 UTC

[3/4] eagle git commit: [EAGLE-900] Only show left navigation item (HDFS, HBase) when we install the JMX application

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/region/regionList.html
----------------------------------------------------------------------
diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/region/regionList.html b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/region/regionList.html
deleted file mode 100644
index d1a7440..0000000
--- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/region/regionList.html
+++ /dev/null
@@ -1,53 +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.
-  -->
-<div class="box box-primary">
-	<div class="box-header with-border">
-		<h3 class="box-title">
-			<span ng-show="!regionserverList._done || isSorting" class="fa fa-refresh fa-spin no-animate"></span>
-		</h3>
-	</div>
-	<div class="box-body">
-		<div id="regionserverList" sort-table="regionserverList" is-sorting="isSorting"
-			 search-path-list="searchPathList"
-			 scope="tableScope">
-			<table class="table table-bordered">
-				<thead>
-				<tr>
-					<th sortpath="tags.hostname">RegionServer</th>
-					<th sortpath="tags.rack">Rack</th>
-					<th sortpath="tags.site">SiteId</th>
-					<th sortpath="status">Status</th>
-				</tr>
-				</thead>
-				<tbody>
-				<tr ng-repeat="item in regionserverList">
-					<td>
-						<a ui-sref="regionDetail({siteId: site, hostname: item.tags.hostname})">{{item.tags.hostname}}</a>
-					</td>
-					<td>{{item.tags.rack}}</td>
-					<td>{{item.tags.site}}</td>
-					<td>
-						<span ng-if="item.status===live" class="label label-success">Healthy</span>
-						<span ng-if="item.status===dead" class="label label-danger">UnHealthy</span>
-					</td>
-				</tr>
-				</tbody>
-			</table>
-		</div>
-	</div>
-</div>

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/style/index.css
----------------------------------------------------------------------
diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/style/index.css b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/style/index.css
deleted file mode 100644
index aa215ab..0000000
--- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/style/index.css
+++ /dev/null
@@ -1,88 +0,0 @@
-@CHARSET "UTF-8";
-/*
- * 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.
- */
-
-.hadoopMetric-chart {
-	position: relative;
-	margin-bottom: 15px;
-}
-
-.hadoopMetric-chart h3 {
-	font-size: 20px;
-	margin: 10px 0 0 0;
-}
-
-.hadoopMetric-chart .hadoopMetric-chart-container {
-	height: 300px;
-	position: relative;
-}
-
-.hadoopMetric-chart .hadoopMetric-no-chart-data {
-	position:absolute;
-	left: 38%;
-	top: 40%;
-	font-size: 20px;
-	color: #999;
-}
-
-.with-border .hadoopMetric-chart {
-	padding-bottom: 15px;
-	margin-bottom: 15px;
-	border-bottom: 1px solid #f4f4f4;
-}
-
-.with-border .hadoopMetric-chart:last-child {
-	padding-bottom: 0;
-	margin-bottom: 0;
-	border-bottom: 0;
-}
-
-.hadoopMetric-widget {
-	width: 100%;
-	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
-	border-radius: 2px;
-	padding: 10px;
-}
-
-.hadoopMetric-widget h3 {
-	margin: 0;
-	padding: 0;
-}
-
-.hadoopMetric-widget .hadoopMetric-chart-container {
-	height: 100px;
-}
-
-.hadoopMetric-summary-a {
-	color: #fff;
-}
-
-.small-box.hadoopMetric-widget {
-	margin: 0;
-	height: 100%;
-	min-height: 110px;
-}
-
-.hadoopMetric-widget-detail {
-	margin-left: 12px;
-	margin-top: 10px;
-}
-
-.hadoopMetric-table {
-	text-align: right;
-}

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/widgets/availabilityChart.js
----------------------------------------------------------------------
diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/widgets/availabilityChart.js b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/widgets/availabilityChart.js
deleted file mode 100644
index 2359c59..0000000
--- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/widgets/availabilityChart.js
+++ /dev/null
@@ -1,145 +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.
- */
-
-(function () {
-	/**
-	 * `register` without params will load the module which using require
-	 */
-	register(function (hadoopMetricApp) {
-		var COLOR_MAPPING = {
-			HDFS: 'orange',
-			HBase: 'yellow',
-			Yarn: 'green'
-		};
-
-		hadoopMetricApp.directive("hadoopMetricWidget", function () {
-			return {
-				restrict: 'AE',
-				controller: function ($scope, $attrs, METRIC, Application, $interval, Site, $wrapState) {
-					// Get site
-					var site = $scope.site;
-					var refreshInterval;
-
-					if(!site) {
-						$scope.list = $.map(Application.find("HADOOP_METRIC_MONITOR"), function (app) {
-							return {
-								siteId: app.site.siteId,
-								siteName: app.site.siteName || app.site.siteId
-							};
-						});
-					} else {
-						$scope.list = [{
-							siteId: site.siteId,
-							siteName: site.siteName || site.siteId
-						}];
-					}
-					// Get type
-					$scope.type = $attrs.type;
-
-					// Customize chart color
-					$scope.bgColor = COLOR_MAPPING[$scope.type];
-
-					function countHBaseRole(site, status, role, groups, filed, limit) {
-						var jobCond = {
-							site: site,
-							status: status,
-							role: role
-						};
-						return METRIC.aggHBaseInstance(jobCond, groups, filed, limit);
-					}
-
-					// Ref: jpm widget if need keep refresh the widget
-
-					function refresh() {
-						$.each($scope.list, function (i, site) {
-
-							countHBaseRole(site.siteId, "active", "hmaster", ["site"], "count")._promise.then(function (res) {
-								$.map(res, function (data) {
-									$scope.hmasteractivenum = data.value[0];
-								});
-							});
-							countHBaseRole(site.siteId, "standby", "hmaster", ["site"], "count")._promise.then(function (res) {
-								$.map(res, function (data) {
-									$scope.hmasterstandbynum = data.value[0];
-								});
-							});
-							countHBaseRole(site.siteId, "live", "regionserver", ["site"], "count")._promise.then(function (res) {
-								$.map(res, function (data) {
-									$scope.regionserverhealtynum = data.value[0];
-								});
-							});
-							countHBaseRole(site.siteId, "dead", "regionserver", ["site"], "count")._promise.then(function (res) {
-								$.map(res, function (data) {
-									$scope.regionserverunhealtynum = data.value[0];
-								});
-							});
-						});
-					}
-
-					refresh();
-					refreshInterval = $interval(refresh, 30 * 1000);
-
-					$scope.$on('$destroy', function () {
-						$interval.cancel(refreshInterval);
-					});
-				},
-				template:
-				'<div class="small-box hadoopMetric-widget bg-{{bgColor}}">' +
-				    '<div class="inner">' +
-				        '<h3>{{type}}</h3>' +
-				        '<div ng-show="hmasteractivenum" class="hadoopMetric-widget-detail">' +
-					        '<a ui-sref="HadoopMetric({siteId: site.siteId})">' +
-				            '<span>{{hmasteractivenum+hmasterstandbynum}}</span> Masters (' +
-				            '<span ng-show="hmasteractivenum">{{hmasteractivenum}}</span><span ng-show="!hmasteractivenum">0</span> Active / ' +
-				            '<span ng-show="hmasterstandbynum">{{hmasterstandbynum}}</span><span ng-show="!hmasterstandbynum">0</span> Standby)' +
-					        '</a>' +
-				        '</div>' +
-				        '<div ng-show="!hmasteractivenum" class="hadoopMetric-widget-detail">' +
-				           '<span class="fa fa-question-circle"></span><span> NO DATA</span>' +
-				        '</div>' +
-				        '<div ng-show="hmasteractivenum" class="hadoopMetric-widget-detail">' +
-				            '<a ui-sref="regionList({siteId: site.siteId})">' +
-				            '<span>{{regionserverhealtynum+regionserverunhealtynum}}</span> RegionServers (' +
-				            '<span ng-show="regionserverhealtynum">{{regionserverhealtynum}}</span><span ng-show="!regionserverhealtynum">0</span> Healthy / ' +
-				            '<span ng-show="regionserverunhealtynum">{{regionserverunhealtynum}}</span><span ng-show="!regionserverunhealtynum">0</span> Unhealthy)' +
-				            '</a>' +
-				        '</div>' +
-				    '</div>' +
-				    '<div class="icon">' +
-				        '<i class="fa fa-taxi"></i>' +
-				    '</div>' +
-				'</div>',
-				replace: true
-			};
-		});
-
-		function withType(serviceType) {
-			/**
-			 * Customize the widget content. Return false will prevent auto compile.
-			 * @param {{}} $element
-			 * @param {function} $element.append
-			 */
-			return function registerWidget($element) {
-				$element.append(
-					$("<div hadoop-metric-widget data-type='" + serviceType + "'>")
-				);
-			};
-		}
-		hadoopMetricApp.widget("availabilityHBaseChart", withType('HBase'), true);
-	});
-})();

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/src/main/webapp/app/apps/index.html
----------------------------------------------------------------------
diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/index.html b/eagle-hadoop-metric/src/main/webapp/app/apps/index.html
deleted file mode 100644
index 191ea15..0000000
--- a/eagle-hadoop-metric/src/main/webapp/app/apps/index.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<htm>
-    <body>
-    <h1>Hadoop Metric Monitor Application!</h1>
-    <i><b>url</b>: /apps/hadoop_metric</i>
-    </body>
-</htm>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/HadoopMetricMonitorAppDebug.java
----------------------------------------------------------------------
diff --git a/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/HadoopMetricMonitorAppDebug.java b/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/HadoopMetricMonitorAppDebug.java
deleted file mode 100644
index 03ba4ee..0000000
--- a/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/HadoopMetricMonitorAppDebug.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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.
- */
-package org.apache.eagle.metric;
-
-public class HadoopMetricMonitorAppDebug {
-    public static void main(String[] args) {
-        new HadoopMetricMonitorApp().run(args);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/HadoopMetricMonitorAppProviderTest.java
----------------------------------------------------------------------
diff --git a/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/HadoopMetricMonitorAppProviderTest.java b/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/HadoopMetricMonitorAppProviderTest.java
deleted file mode 100644
index 94e1b82..0000000
--- a/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/HadoopMetricMonitorAppProviderTest.java
+++ /dev/null
@@ -1,89 +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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.
- */
-package org.apache.eagle.metric;
-
-
-import com.google.inject.Inject;
-import org.apache.eagle.app.resource.ApplicationResource;
-import org.apache.eagle.app.service.ApplicationOperations;
-import org.apache.eagle.app.test.ApplicationSimulator;
-import org.apache.eagle.app.test.ApplicationTestBase;
-import org.apache.eagle.metadata.model.ApplicationEntity;
-import org.apache.eagle.metadata.model.SiteEntity;
-import org.apache.eagle.metadata.resource.SiteResource;
-import org.apache.eagle.metadata.service.ApplicationStatusUpdateService;
-import org.junit.Assert;
-import org.junit.Test;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class HadoopMetricMonitorAppProviderTest extends ApplicationTestBase {
-
-    @Inject
-    private SiteResource siteResource;
-    @Inject
-    private ApplicationResource applicationResource;
-    @Inject
-    private ApplicationSimulator simulator;
-    @Inject
-    ApplicationStatusUpdateService statusUpdateService;
-
-    @Test
-    public void testApplicationLifecycle() throws InterruptedException {
-        // Create local site
-        SiteEntity siteEntity = new SiteEntity();
-        siteEntity.setSiteId("test_site");
-        siteEntity.setSiteName("Test Site");
-        siteEntity.setDescription("Test Site for HADOOP_METRIC_MONITOR");
-        siteResource.createSite(siteEntity);
-        Assert.assertNotNull(siteEntity.getUuid());
-
-        ApplicationOperations.InstallOperation installOperation = new ApplicationOperations.InstallOperation("test_site", "HADOOP_METRIC_MONITOR", ApplicationEntity.Mode.LOCAL);
-        installOperation.setConfiguration(getConf());
-
-        //Install dependency
-        ApplicationOperations.InstallOperation installOperationDependency = new ApplicationOperations.InstallOperation("test_site", "TOPOLOGY_HEALTH_CHECK_APP", ApplicationEntity.Mode.LOCAL);
-        applicationResource.installApplication(installOperationDependency);
-
-        // Install application
-        ApplicationEntity applicationEntity = applicationResource.installApplication(installOperation).getData();
-        // Uninstall application
-        applicationResource.uninstallApplication(new ApplicationOperations.UninstallOperation(applicationEntity.getUuid()));
-        try {
-            applicationResource.getApplicationEntityByUUID(applicationEntity.getUuid());
-            Assert.fail("Application instance (UUID: " + applicationEntity.getUuid() + ") should have been uninstalled");
-        } catch (Exception ex) {
-            // Expected exception
-        }
-    }
-
-    private Map<String, Object> getConf() {
-        Map<String, Object> conf = new HashMap<>();
-        conf.put("dataSinkConfig.topic", "testTopic");
-        conf.put("dataSinkConfig.brokerList", "broker");
-        conf.put("dataSinkConfig.serializerClass", "serializerClass");
-        conf.put("dataSinkConfig.keySerializerClass", "keySerializerClass");
-        conf.put("dataSinkConfig.producerType", "async");
-        conf.put("dataSinkConfig.numBatchMessages", 4096);
-        conf.put("dataSinkConfig.maxQueueBufferMs", 5000);
-        conf.put("dataSinkConfig.requestRequiredAcks", 0);
-        conf.put("spoutNum", 2);
-        conf.put("mode", "LOCAL");
-        return conf;
-    }
-}

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/SendSampleDataToKafka.java
----------------------------------------------------------------------
diff --git a/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/SendSampleDataToKafka.java b/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/SendSampleDataToKafka.java
deleted file mode 100644
index 026f60b..0000000
--- a/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/SendSampleDataToKafka.java
+++ /dev/null
@@ -1,56 +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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.
- */
-package org.apache.eagle.metric;
-
-import com.typesafe.config.ConfigFactory;
-import kafka.producer.KeyedMessage;
-import kafka.producer.ProducerConfig;
-import org.apache.eagle.app.messaging.KafkaStreamProvider;
-import org.apache.eagle.app.messaging.KafkaStreamSinkConfig;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.Properties;
-
-public class SendSampleDataToKafka {
-    public static void main(String[] args) throws URISyntaxException, IOException {
-        String data = "{" +
-            "\"host\":\"localhost\", " +
-            "\"timestamp\": 1480319109000, " +
-            "\"metric\": \"hadoop.cpu.usage\", " +
-            "\"component\": \"namenode\", " +
-            "\"site\": \"test\", " +
-            "\"value\": 0.98}";
-        KafkaStreamSinkConfig config = new KafkaStreamProvider().getSinkConfig("HADOOP_JMX_METRIC_STREAM",ConfigFactory.load());
-        Properties properties = new Properties();
-        properties.put("metadata.broker.list", config.getBrokerList());
-        properties.put("serializer.class", config.getSerializerClass());
-        properties.put("key.serializer.class", config.getKeySerializerClass());
-        // new added properties for async producer
-        properties.put("producer.type", config.getProducerType());
-        properties.put("batch.num.messages", config.getNumBatchMessages());
-        properties.put("request.required.acks", config.getRequestRequiredAcks());
-        properties.put("queue.buffering.max.ms", config.getMaxQueueBufferMs());
-        ProducerConfig producerConfig = new ProducerConfig(properties);
-        kafka.javaapi.producer.Producer producer = new kafka.javaapi.producer.Producer(producerConfig);
-        try {
-            producer.send(new KeyedMessage(config.getTopicId(), data));
-        } finally {
-            producer.close();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/src/test/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-hadoop-metric/src/test/resources/application.conf b/eagle-hadoop-metric/src/test/resources/application.conf
deleted file mode 100644
index 8ff6016..0000000
--- a/eagle-hadoop-metric/src/test/resources/application.conf
+++ /dev/null
@@ -1,49 +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.
-
-
-
-
-{
-  service {
-    env = "testing"
-    host = "localhost"
-    port = 9090
-    username = "admin"
-    password = "secret"
-    readTimeOutSeconds = 60
-    context = "/rest"
-    timezone = "UTC"
-  }
-  
-  "appId" : "HadoopJmxAppForTest",
-  "mode" : "LOCAL",
-  "siteId" : "testsite",
-  "dataSourceConfig": {
-    "topic" : "hadoop_jmx_metric",
-    "zkConnection" : "localhost:2181",
-    "txZkServers" : "localhost:2181"
-  }
-  "dataSinkConfig": {
-    "topic" : "hadoop_jmx_metric",
-    "brokerList" : "localhost:6667",
-    "serializerClass" : "kafka.serializer.StringEncoder",
-    "keySerializerClass" : "kafka.serializer.StringEncoder"
-    "producerType" : "async",
-    "numBatchMessages" : "4096",
-    "maxQueueBufferMs" : "5000",
-    "requestRequiredAcks" : "0"
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/src/test/resources/hadoop_jmx_metric_sample.json
----------------------------------------------------------------------
diff --git a/eagle-hadoop-metric/src/test/resources/hadoop_jmx_metric_sample.json b/eagle-hadoop-metric/src/test/resources/hadoop_jmx_metric_sample.json
deleted file mode 100644
index 68472a0..0000000
--- a/eagle-hadoop-metric/src/test/resources/hadoop_jmx_metric_sample.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "host":"localhost",
-  "timestamp": 1480319107000,
-  "metric": "hadoop.cpu.usage",
-  "component": "namenode",
-  "site": "test",
-  "value": 0.96
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/src/test/resources/integrate_test_policy.json
----------------------------------------------------------------------
diff --git a/eagle-hadoop-metric/src/test/resources/integrate_test_policy.json b/eagle-hadoop-metric/src/test/resources/integrate_test_policy.json
deleted file mode 100644
index e9de11c..0000000
--- a/eagle-hadoop-metric/src/test/resources/integrate_test_policy.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
-  "name": "TEST_POLICY",
-  "description": "from HADOOP_JMX_METRIC_STREAM_SANDBOX[site==\"test\"] insert into ALERT_STREAM;",
-  "inputStreams": [
-    "HADOOP_JMX_METRIC_STREAM_SANDBOX"
-  ],
-  "outputStreams": [
-    "ALERT_STREAM"
-  ],
-  "definition": {
-    "type": "siddhi",
-    "value": "from HADOOP_JMX_METRIC_STREAM_SANDBOX[site==\"test\"] select component,value, name insert into ALERT_STREAM;",
-    "handlerClass": null,
-    "properties": {},
-    "inputStreams": [],
-    "outputStreams": []
-  },
-  "stateDefinition": null,
-  "policyStatus": "ENABLED",
-  "alertDefinition": {
-    "templateType": "TEXT",
-    "subject": "$component Disk Usage $value",
-    "body": "#set($usage_percentage = $value * 100)\r\n\r\nDisk Usage (<strong>$metric<strong>) reached <span style=\"color:red\">$usage_percentage %</span> (Threshold: 90%) on <strong>$component</strong> of cluster: <strong>$site</strong> on:\r\n<ul>\r\n    <li><strong>Hostname</strong>: $host</li>\r\n    <li><strong>When</strong>: $ALERT_TIME</li>\r\n    <li><strong>Root Cause</strong>: UNKNOWN</li>\r\n    <li><strong>Action Required</strong>: N/A</li>\r\n</ul>",
-    "severity": "CRITICAL",
-    "category": "HDFS"
-  },
-  "partitionSpec": [
-    {
-      "streamId": "HADOOP_JMX_METRIC_STREAM_SANDBOX",
-      "type": "SHUFFLE",
-      "columns": [],
-      "sortSpec": null
-    }
-  ],
-  "dedicated": false,
-  "parallelismHint": 5
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hadoop-metric/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hadoop-metric/pom.xml b/eagle-metric/eagle-hadoop-metric/pom.xml
new file mode 100644
index 0000000..21c351c
--- /dev/null
+++ b/eagle-metric/eagle-hadoop-metric/pom.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>eagle-metric-parent</artifactId>
+        <groupId>org.apache.eagle</groupId>
+        <version>0.5.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>eagle-hadoop-metric</artifactId>
+    <name>Eagle::App::HadoopMetric</name>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-app-base</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hadoop-metric/src/main/java/org/apache/eagle/metric/HadoopMetricMonitorApp.java
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hadoop-metric/src/main/java/org/apache/eagle/metric/HadoopMetricMonitorApp.java b/eagle-metric/eagle-hadoop-metric/src/main/java/org/apache/eagle/metric/HadoopMetricMonitorApp.java
new file mode 100644
index 0000000..304e500
--- /dev/null
+++ b/eagle-metric/eagle-hadoop-metric/src/main/java/org/apache/eagle/metric/HadoopMetricMonitorApp.java
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.
+ */
+package org.apache.eagle.metric;
+
+import backtype.storm.generated.StormTopology;
+import com.typesafe.config.Config;
+import org.apache.eagle.app.StormApplication;
+import org.apache.eagle.app.environment.builder.MetricDefinition;
+import org.apache.eagle.app.environment.impl.StormEnvironment;
+
+import java.util.Calendar;
+
+public class HadoopMetricMonitorApp extends StormApplication {
+    @Override
+    public StormTopology execute(Config config, StormEnvironment environment) {
+        return environment.newApp(config)
+            .fromStream("HADOOP_JMX_METRIC_STREAM")
+            .saveAsMetric(MetricDefinition
+                .metricType("HADOOP_JMX_METRICS")
+                .namedByField("metric")
+                .eventTimeByField("timestamp")
+                .dimensionFields("host","component","site")
+                .granularity(Calendar.MINUTE)
+                .valueField("value"))
+            .toTopology();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hadoop-metric/src/main/java/org/apache/eagle/metric/HadoopMetricMonitorAppProdiver.java
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hadoop-metric/src/main/java/org/apache/eagle/metric/HadoopMetricMonitorAppProdiver.java b/eagle-metric/eagle-hadoop-metric/src/main/java/org/apache/eagle/metric/HadoopMetricMonitorAppProdiver.java
new file mode 100644
index 0000000..dc7ea97
--- /dev/null
+++ b/eagle-metric/eagle-hadoop-metric/src/main/java/org/apache/eagle/metric/HadoopMetricMonitorAppProdiver.java
@@ -0,0 +1,29 @@
+/*
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.
+ */
+package org.apache.eagle.metric;
+
+import org.apache.eagle.app.spi.AbstractApplicationProvider;
+
+/**
+ * Metadata: META-INF/providers/org.apache.eagle.metric.HadoopMetricMonitorAppProdiver.xml.
+ */
+public class HadoopMetricMonitorAppProdiver extends AbstractApplicationProvider<HadoopMetricMonitorApp> {
+    @Override
+    public HadoopMetricMonitorApp getApplication() {
+        return new HadoopMetricMonitorApp();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hadoop-metric/src/main/resources/META-INF/providers/org.apache.eagle.metric.HadoopMetricMonitorAppProdiver.xml
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hadoop-metric/src/main/resources/META-INF/providers/org.apache.eagle.metric.HadoopMetricMonitorAppProdiver.xml b/eagle-metric/eagle-hadoop-metric/src/main/resources/META-INF/providers/org.apache.eagle.metric.HadoopMetricMonitorAppProdiver.xml
new file mode 100644
index 0000000..9c34b1f
--- /dev/null
+++ b/eagle-metric/eagle-hadoop-metric/src/main/resources/META-INF/providers/org.apache.eagle.metric.HadoopMetricMonitorAppProdiver.xml
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ 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.
+  -->
+
+<application>
+    <type>HADOOP_METRIC_MONITOR</type>
+    <name>Hadoop Metrics Monitor</name>
+    <configuration>
+        <!-- data fromStream configurations -->
+        <property>
+            <name>dataSinkConfig.HADOOP_JMX_METRIC_STREAM.topic</name>
+            <displayName>JMX Metric Kafka Topic</displayName>
+            <value>hadoop_jmx_metric_${siteId}</value>
+            <description>Hadoop JMX metric kafka topic name for stream: HADOOP_JMX_METRIC_STREAM</description>
+            <required>true</required>
+        </property>
+        <property>
+            <name>dataSinkConfig.brokerList</name>
+            <displayName>Kafka Brokers</displayName>
+            <value>localhost:6667</value>
+            <description>Sourced Kafka Brokers like broker1,broker2,...</description>
+            <required>true</required>
+        </property>
+        <property>
+            <name>dataSourceConfig.zkConnection</name>
+            <displayName>Zookeeper Quorum</displayName>
+            <value>localhost:2181</value>
+            <description>Kafka Zookeeper Quorum</description>
+            <required>true</required>
+        </property>
+        <property>
+            <name>dataSourceConfig.fetchSize</name>
+            <displayName>Kafka Fetch Size</displayName>
+            <value>1048576</value>
+            <description>Kafka Fetch Size</description>
+            <required>false</required>
+        </property>
+        <property>
+            <name>dataSourceConfig.transactionZKRoot</name>
+            <displayName>Kafka Transaction Root Path</displayName>
+            <value>/consumers</value>
+            <description>Kafka Transaction Root Path</description>
+            <required>false</required>
+        </property>
+        <property>
+            <name>dataSourceConfig.consumerGroupId</name>
+            <displayName>Kafka Consumer Group ID</displayName>
+            <value>eagleConsumer</value>
+            <description>Kafka Consumer Group ID</description>
+            <required>false</required>
+        </property>
+        <property>
+            <name>dataSourceConfig.brokerZkPath</name>
+            <displayName>Kafka Broker ZkPath</displayName>
+            <description>Kafka Broker ZkPath</description>
+            <required>false</required>
+        </property>
+        <property>
+            <name>dataSourceConfig.txZkServers</name>
+            <displayName>Kafka Transaction Zookeeper Servers</displayName>
+            <description>Kafka Transaction Zookeeper Servers</description>
+            <value>localhost:2181</value>
+            <required>true</required>
+        </property>
+        <property>
+            <name>dataSourceConfig.transactionStateUpdateMS</name>
+            <value>2000</value>
+            <displayName>Kafka Transaction Status Update MS</displayName>
+            <description>Kafka Transaction Status Update MS</description>
+            <required>false</required>
+        </property>
+        <property>
+            <name>service.host</name>
+            <displayName>Eagle Service Host</displayName>
+            <description>Set additional eagle service host, default: using current host</description>
+        </property>
+        <property>
+            <name>service.port</name>
+            <displayName>Eagle Service Port</displayName>
+            <description>Set additional eagle service port, default: using current port</description>
+        </property>
+    </configuration>
+    <streams>
+        <stream>
+            <streamId>HADOOP_JMX_METRIC_STREAM</streamId>
+            <description>Hadoop JMX Metric Stream including name node, resource manager, etc.</description>
+            <columns>
+                <column>
+                    <name>host</name>
+                    <type>string</type>
+                </column>
+                <column>
+                    <name>timestamp</name>
+                    <type>long</type>
+                </column>
+                <column>
+                    <name>metric</name>
+                    <type>string</type>
+                </column>
+                <column>
+                    <name>component</name>
+                    <type>string</type>
+                </column>
+                <column>
+                    <name>site</name>
+                    <type>string</type>
+                </column>
+                <column>
+                    <name>value</name>
+                    <type>double</type>
+                    <defaultValue>0.0</defaultValue>
+                </column>
+            </columns>
+        </stream>
+    </streams>
+    <docs>
+        <install>
+            <b>How to Install</b>
+            <ol>
+                <li>Create a kafka topic named <code>hadoop_jmx_metric_{SITE_ID}</code></li>
+                <li>Setup metric collector for monitored Hadoop/HBase using <a target="_blank" href="https://github.com/apache/incubator-eagle/tree/master/eagle-external/hadoop_jmx_collector">hadoop_jmx_collector</a></li>
+                <li>Setup <code>Kafka Topic Name</code> and <code>Kafka Broker List </code> in <code>Settings</code> tab</li>
+                <li>Click "Install" button then you will see the <code>HADOOP_JMX_METRIC_STREAM_{SITE_ID}</code> in <a href="/#/alert/streamList">Streams</a></li>
+            </ol>
+        </install>
+        <uninstall>
+            <b>How to Uninstall</b>
+            <ol>
+                <li>Stop and remove installed <code>hadoop_jmx_collector</code></li>
+                <li>Remove kafka topic <code>hadoop_jmx_metric_{SITE_ID}</code></li>
+                <li>Click "Uninstall" button which will remove stream <code>HADOOP_JMX_METRIC_STREAM_{SITE_ID}</code></li>
+            </ol>
+        </uninstall>
+    </docs>
+</application>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hadoop-metric/src/main/resources/META-INF/services/org.apache.eagle.app.spi.ApplicationProvider
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hadoop-metric/src/main/resources/META-INF/services/org.apache.eagle.app.spi.ApplicationProvider b/eagle-metric/eagle-hadoop-metric/src/main/resources/META-INF/services/org.apache.eagle.app.spi.ApplicationProvider
new file mode 100644
index 0000000..25d911d
--- /dev/null
+++ b/eagle-metric/eagle-hadoop-metric/src/main/resources/META-INF/services/org.apache.eagle.app.spi.ApplicationProvider
@@ -0,0 +1,16 @@
+# 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.
+
+org.apache.eagle.metric.HadoopMetricMonitorAppProdiver
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hadoop-metric/src/main/resources/datasources.json
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hadoop-metric/src/main/resources/datasources.json b/eagle-metric/eagle-hadoop-metric/src/main/resources/datasources.json
new file mode 100644
index 0000000..5c10696
--- /dev/null
+++ b/eagle-metric/eagle-hadoop-metric/src/main/resources/datasources.json
@@ -0,0 +1,19 @@
+[
+  {
+    "name": "hadoop_jmx_datasource",
+    "type": "KAFKA",
+    "properties": {
+    },
+    "topic": "hadoop_jmx_metrics",
+    "schemeCls": "org.apache.eagle.alert.engine.scheme.JsonScheme",
+    "codec": {
+      "streamNameSelectorProp": {
+        "userProvidedStreamName" : "hadoopJmxMetricEventStream",
+        "streamNameFormat":"%s"
+      },
+      "streamNameSelectorCls":"org.apache.eagle.alert.engine.scheme.JsonStringStreamNameSelector",
+      "timestampColumn": "timestamp",
+      "timestampFormat": ""
+    }
+  }
+]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hadoop-metric/src/main/resources/policies.json
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hadoop-metric/src/main/resources/policies.json b/eagle-metric/eagle-hadoop-metric/src/main/resources/policies.json
new file mode 100644
index 0000000..811ffb0
--- /dev/null
+++ b/eagle-metric/eagle-hadoop-metric/src/main/resources/policies.json
@@ -0,0 +1,169 @@
+[
+  {
+    "name": "haStatePolicy",
+    "description": "ha state check for hadoop name node",
+    "definition": {
+      "inputStreams": [
+        "hadoopJmxMetricEventStream"
+      ],
+      "outputStreams": [
+        "tmp"
+      ],
+      "type": "siddhi",
+      "value": " from every a = hadoopJmxMetricEventStream[metric==\"hadoop.namenode.fsnamesystem.hastate\"] -> b = hadoopJmxMetricEventStream[metric==a.metric and b.host == a.host and (convert(a.value, \"long\\\") != convert(value, \"long\"))] within 10 min select a.host, a.value as oldHaState, b.value as newHaState, b.timestamp as timestamp, b.metric as metric, b.component as component, b.site as site insert into tmp; "
+    },
+    "partitionSpec": [
+      {
+        "streamId": "hadoopJmxMetricEventStream",
+        "type": "GROUPBY",
+        "columns": [
+          "host"
+        ]
+      }
+    ]
+  },
+
+  {
+    "name": "capacityUsedPolicy",
+    "description": "capacity usage check for hadoop cluster",
+    "definition": {
+      "inputStreams": [
+        "hadoopJmxMetricEventStream"
+      ],
+      "outputStreams": [
+        "tmp"
+      ],
+      "type": "siddhi",
+      "value": " from hadoopJmxMetricEventStream[metric == \"hadoop.namenode.fsnamesystemstate.capacityused\" and convert(value, \"long\") > 0]#window.externalTime(timestamp ,10 min) select metric, host, value, timestamp, component, site insert into tmp; "
+    },
+    "partitionSpec": [
+      {
+        "streamId": "hadoopJmxMetricEventStream",
+        "type": "GROUPBY",
+        "columns": [
+          "host"
+        ]
+      }
+    ]
+  },
+
+  {
+    "name": "lastCheckPointTimePolicy",
+    "description": "last check point interval check for hadoop name node pair",
+    "definition": {
+      "inputStreams": [
+        "hadoopJmxMetricEventStream"
+      ],
+      "outputStreams": [
+        "tmp"
+      ],
+      "type": "siddhi",
+      "value": " from hadoopJmxMetricEventStream[metric == \"hadoop.namenode.dfs.lastcheckpointtime\" and (convert(value, \"long\") + 18000000) < timestamp]#window.externalTime(timestamp ,10 min) select metric, host, value, timestamp, component, site insert into tmp;  "
+    },
+    "partitionSpec": [
+      {
+        "streamId": "hadoopJmxMetricEventStream",
+        "type": "GROUPBY",
+        "columns": [
+          "host"
+        ]
+      }
+    ]
+  },
+
+  {
+    "name": "missingBlockPolicy",
+    "description": "missing block number check for hadoop cluster",
+    "definition": {
+      "inputStreams": [
+        "hadoopJmxMetricEventStream"
+      ],
+      "outputStreams": [
+        "tmp"
+      ],
+      "type": "siddhi",
+      "value": " from hadoopJmxMetricEventStream[metric == \"hadoop.namenode.dfs.missingblocks\" and convert(value, \"long\") > 0]#window.externalTime(timestamp ,10 min) select metric, host, value, timestamp, component, site insert into tmp;  "
+    },
+    "partitionSpec": [
+      {
+        "streamId": "hadoopJmxMetricEventStream",
+        "type": "GROUPBY",
+        "columns": [
+          "host"
+        ]
+      }
+    ]
+  },
+
+  {
+    "name": "namenodeTxLagPolicy",
+    "description": "name node tx log lag check",
+    "definition": {
+      "inputStreams": [
+        "hadoopJmxMetricEventStream"
+      ],
+      "outputStreams": [
+        "tmp"
+      ],
+      "type": "siddhi",
+      "value": " from every a = hadoopJmxMetricEventStream[metric==\"hadoop.namenode.journaltransaction.lastappliedorwrittentxid\"] -> b = hadoopJmxMetricEventStream[metric==a.metric and b.host != a.host and (max(convert(a.value, \"long\")) + 100) <= max(convert(value, \"long\"))] within 5 min select a.host as hostA, a.value as transactIdA, b.host as hostB, b.value as transactIdB insert into tmp; "
+    },
+    "partitionSpec": [
+      {
+        "streamId": "hadoopJmxMetricEventStream",
+        "type": "GROUPBY",
+        "columns": [
+          "host"
+        ]
+      }
+    ]
+  },
+
+  {
+    "name": "nodecountPolicy",
+    "description": "data node number check for hadoop cluster",
+    "definition": {
+      "inputStreams": [
+        "hadoopJmxMetricEventStream"
+      ],
+      "outputStreams": [
+        "tmp"
+      ],
+      "type": "siddhi",
+      "value": " from every (e1 = hadoopJmxMetricEventStream[metric == \"hadoop.namenode.fsnamesystemstate.numlivedatanodes\" ]) -> e2 = hadoopJmxMetricEventStream[metric == e1.metric and host == e1.host and (convert(e1.value, \"long\") - 5) >= convert(value, \"long\") ] within 5 min select e1.metric, e1.host, e1.value as highNum, e1.timestamp as start, e2.value as lowNum, e2.timestamp as end insert into tmp;  "
+    },
+    "partitionSpec": [
+      {
+        "streamId": "hadoopJmxMetricEventStream",
+        "type": "GROUPBY",
+        "columns": [
+          "host"
+        ]
+      }
+    ]
+  },
+
+  {
+    "name": "nameNodeSafeModeCheckPolicy",
+    "description": "safe mode check for name node",
+    "definition": {
+      "inputStreams": [
+        "hadoopJmxMetricEventStream"
+      ],
+      "outputStreams": [
+        "tmp"
+      ],
+      "type": "siddhi",
+      "value": " from hadoopJmxMetricEventStream[component==\"namenode\" and metric == \"hadoop.namenode.fsnamesystemstate.fsstate\" and convert(value, \"long\") > 0]#window.externalTime(timestamp ,10 min) select metric, host, value, timestamp, component, site insert into tmp;  "
+    },
+    "partitionSpec": [
+      {
+        "streamId": "hadoopJmxMetricEventStream",
+        "type": "GROUPBY",
+        "columns": [
+          "host"
+        ]
+      }
+    ]
+  }
+]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hadoop-metric/src/main/resources/publishments.json
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hadoop-metric/src/main/resources/publishments.json b/eagle-metric/eagle-hadoop-metric/src/main/resources/publishments.json
new file mode 100644
index 0000000..10d16a4
--- /dev/null
+++ b/eagle-metric/eagle-hadoop-metric/src/main/resources/publishments.json
@@ -0,0 +1,33 @@
+[
+  {
+    "name":"jmxStreamOutput_email",
+    "type":"org.apache.eagle.alert.engine.publisher.impl.AlertEmailPublisher",
+    "policyIds": [
+      "perfmon_cpu_host_check", "perfmon_cpu_pool_check"
+    ],
+    "properties": {
+      "subject":"Hadoop Jmx Metrics Alert",
+      "template":"",
+      "sender": "sender@corp.com",
+      "recipients": "services@corp.com",
+      "smtp.server":"smtp.mailhost.com",
+      "connection": "plaintext",
+      "smtp.port": "25"
+    },
+    "dedupIntervalMin" : "PT1M",
+    "serializer" : "org.apache.eagle.alert.engine.publisher.impl.StringEventSerializer"
+  },
+  {
+    "type": "org.apache.eagle.alert.engine.publisher.impl.AlertKafkaPublisher",
+    "name":"jmxStreamOutput_kafka",
+    "policyIds": [
+      "perfmon_cpu_host_check"
+    ],
+    "dedupIntervalMin": "PT1M",
+    "properties":{
+      "kafka_broker":"localhost:9092",
+      "topic":"jmx_alerts"
+    },
+    "serializer" : "org.apache.eagle.alert.engine.publisher.impl.StringEventSerializer"
+  }
+]

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hadoop-metric/src/main/resources/streamdefinitions.json
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hadoop-metric/src/main/resources/streamdefinitions.json b/eagle-metric/eagle-hadoop-metric/src/main/resources/streamdefinitions.json
new file mode 100644
index 0000000..66a2c98
--- /dev/null
+++ b/eagle-metric/eagle-hadoop-metric/src/main/resources/streamdefinitions.json
@@ -0,0 +1,47 @@
+[
+  {
+    "streamId": "hadoopJmxMetricEventStream",
+    "dataSource": "hadoop_jmx_datasource",
+    "description": "the data stream for hadoop jmx metrics",
+    "validate": false,
+    "timeseries": false,
+    "columns": [
+      {
+        "name": "host",
+        "type": "STRING",
+        "defaultValue": "",
+        "required": true
+      },
+      {
+        "name": "timestamp",
+        "type": "LONG",
+        "defaultValue": 0,
+        "required": true
+      },
+      {
+        "name": "metric",
+        "type": "STRING",
+        "defaultValue": "default_hadoop_jmx_metric_name",
+        "required": true
+      },
+      {
+        "name": "component",
+        "type": "STRING",
+        "defaultValue": "namenode",
+        "required": true
+      },
+      {
+        "name": "site",
+        "type": "STRING",
+        "defaultValue": "hadoop",
+        "required": true
+      },
+      {
+        "name": "value",
+        "type": "DOUBLE",
+        "defaultValue": 0.0,
+        "required": true
+      }
+    ]
+  }
+]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/HadoopMetricMonitorAppDebug.java
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/HadoopMetricMonitorAppDebug.java b/eagle-metric/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/HadoopMetricMonitorAppDebug.java
new file mode 100644
index 0000000..e4589b7
--- /dev/null
+++ b/eagle-metric/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/HadoopMetricMonitorAppDebug.java
@@ -0,0 +1,23 @@
+/*
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.
+ */
+package org.apache.eagle.metric;
+
+public class HadoopMetricMonitorAppDebug {
+    public static void main(String[] args) {
+        new HadoopMetricMonitorApp().run(args);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/HadoopMetricMonitorAppProviderTest.java
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/HadoopMetricMonitorAppProviderTest.java b/eagle-metric/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/HadoopMetricMonitorAppProviderTest.java
new file mode 100644
index 0000000..94e1b82
--- /dev/null
+++ b/eagle-metric/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/HadoopMetricMonitorAppProviderTest.java
@@ -0,0 +1,89 @@
+/*
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.
+ */
+package org.apache.eagle.metric;
+
+
+import com.google.inject.Inject;
+import org.apache.eagle.app.resource.ApplicationResource;
+import org.apache.eagle.app.service.ApplicationOperations;
+import org.apache.eagle.app.test.ApplicationSimulator;
+import org.apache.eagle.app.test.ApplicationTestBase;
+import org.apache.eagle.metadata.model.ApplicationEntity;
+import org.apache.eagle.metadata.model.SiteEntity;
+import org.apache.eagle.metadata.resource.SiteResource;
+import org.apache.eagle.metadata.service.ApplicationStatusUpdateService;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class HadoopMetricMonitorAppProviderTest extends ApplicationTestBase {
+
+    @Inject
+    private SiteResource siteResource;
+    @Inject
+    private ApplicationResource applicationResource;
+    @Inject
+    private ApplicationSimulator simulator;
+    @Inject
+    ApplicationStatusUpdateService statusUpdateService;
+
+    @Test
+    public void testApplicationLifecycle() throws InterruptedException {
+        // Create local site
+        SiteEntity siteEntity = new SiteEntity();
+        siteEntity.setSiteId("test_site");
+        siteEntity.setSiteName("Test Site");
+        siteEntity.setDescription("Test Site for HADOOP_METRIC_MONITOR");
+        siteResource.createSite(siteEntity);
+        Assert.assertNotNull(siteEntity.getUuid());
+
+        ApplicationOperations.InstallOperation installOperation = new ApplicationOperations.InstallOperation("test_site", "HADOOP_METRIC_MONITOR", ApplicationEntity.Mode.LOCAL);
+        installOperation.setConfiguration(getConf());
+
+        //Install dependency
+        ApplicationOperations.InstallOperation installOperationDependency = new ApplicationOperations.InstallOperation("test_site", "TOPOLOGY_HEALTH_CHECK_APP", ApplicationEntity.Mode.LOCAL);
+        applicationResource.installApplication(installOperationDependency);
+
+        // Install application
+        ApplicationEntity applicationEntity = applicationResource.installApplication(installOperation).getData();
+        // Uninstall application
+        applicationResource.uninstallApplication(new ApplicationOperations.UninstallOperation(applicationEntity.getUuid()));
+        try {
+            applicationResource.getApplicationEntityByUUID(applicationEntity.getUuid());
+            Assert.fail("Application instance (UUID: " + applicationEntity.getUuid() + ") should have been uninstalled");
+        } catch (Exception ex) {
+            // Expected exception
+        }
+    }
+
+    private Map<String, Object> getConf() {
+        Map<String, Object> conf = new HashMap<>();
+        conf.put("dataSinkConfig.topic", "testTopic");
+        conf.put("dataSinkConfig.brokerList", "broker");
+        conf.put("dataSinkConfig.serializerClass", "serializerClass");
+        conf.put("dataSinkConfig.keySerializerClass", "keySerializerClass");
+        conf.put("dataSinkConfig.producerType", "async");
+        conf.put("dataSinkConfig.numBatchMessages", 4096);
+        conf.put("dataSinkConfig.maxQueueBufferMs", 5000);
+        conf.put("dataSinkConfig.requestRequiredAcks", 0);
+        conf.put("spoutNum", 2);
+        conf.put("mode", "LOCAL");
+        return conf;
+    }
+}

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/SendSampleDataToKafka.java
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/SendSampleDataToKafka.java b/eagle-metric/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/SendSampleDataToKafka.java
new file mode 100644
index 0000000..c53dfe3
--- /dev/null
+++ b/eagle-metric/eagle-hadoop-metric/src/test/java/org/apache/eagle/metric/SendSampleDataToKafka.java
@@ -0,0 +1,56 @@
+/*
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.
+ */
+package org.apache.eagle.metric;
+
+import com.typesafe.config.ConfigFactory;
+import kafka.producer.KeyedMessage;
+import kafka.producer.ProducerConfig;
+import org.apache.eagle.app.messaging.KafkaStreamProvider;
+import org.apache.eagle.app.messaging.KafkaStreamSinkConfig;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.Properties;
+
+public class SendSampleDataToKafka {
+    public static void main(String[] args) throws URISyntaxException, IOException {
+        String data = "{" +
+            "\"host\":\"localhost\", " +
+            "\"timestamp\": 1480319109000, " +
+            "\"metric\": \"hadoop.cpu.usage\", " +
+            "\"component\": \"namenode\", " +
+            "\"site\": \"test\", " +
+            "\"value\": 0.98}";
+        KafkaStreamSinkConfig config = new KafkaStreamProvider().getSinkConfig("HADOOP_JMX_METRIC_STREAM",ConfigFactory.load());
+        Properties properties = new Properties();
+        properties.put("metadata.broker.list", config.getBrokerList());
+        properties.put("serializer.class", config.getSerializerClass());
+        properties.put("key.serializer.class", config.getKeySerializerClass());
+        // new added properties for async producer
+        properties.put("producer.type", config.getProducerType());
+        properties.put("batch.num.messages", config.getNumBatchMessages());
+        properties.put("request.required.acks", config.getRequestRequiredAcks());
+        properties.put("queue.buffering.max.ms", config.getMaxQueueBufferMs());
+        ProducerConfig producerConfig = new ProducerConfig(properties);
+        kafka.javaapi.producer.Producer producer = new kafka.javaapi.producer.Producer(producerConfig);
+        try {
+            producer.send(new KeyedMessage(config.getTopicId(), data));
+        } finally {
+            producer.close();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hadoop-metric/src/test/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hadoop-metric/src/test/resources/application.conf b/eagle-metric/eagle-hadoop-metric/src/test/resources/application.conf
new file mode 100644
index 0000000..4d74666
--- /dev/null
+++ b/eagle-metric/eagle-hadoop-metric/src/test/resources/application.conf
@@ -0,0 +1,49 @@
+# 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.
+
+
+
+
+{
+  service {
+    env = "testing"
+    host = "localhost"
+    port = 9090
+    username = "admin"
+    password = "secret"
+    readTimeOutSeconds = 60
+    context = "/rest"
+    timezone = "UTC"
+  }
+  
+  "appId" : "HadoopJmxAppForTest",
+  "mode" : "LOCAL",
+  "siteId" : "testsite",
+  "dataSourceConfig": {
+    "topic" : "hadoop_jmx_metric",
+    "zkConnection" : "localhost:2181",
+    "txZkServers" : "localhost:2181"
+  }
+  "dataSinkConfig": {
+    "topic" : "hadoop_jmx_metric",
+    "brokerList" : "localhost:6667",
+    "serializerClass" : "kafka.serializer.StringEncoder",
+    "keySerializerClass" : "kafka.serializer.StringEncoder"
+    "producerType" : "async",
+    "numBatchMessages" : "4096",
+    "maxQueueBufferMs" : "5000",
+    "requestRequiredAcks" : "0"
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hadoop-metric/src/test/resources/hadoop_jmx_metric_sample.json
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hadoop-metric/src/test/resources/hadoop_jmx_metric_sample.json b/eagle-metric/eagle-hadoop-metric/src/test/resources/hadoop_jmx_metric_sample.json
new file mode 100644
index 0000000..74852d0
--- /dev/null
+++ b/eagle-metric/eagle-hadoop-metric/src/test/resources/hadoop_jmx_metric_sample.json
@@ -0,0 +1,8 @@
+{
+  "host":"localhost",
+  "timestamp": 1480319107000,
+  "metric": "hadoop.cpu.usage",
+  "component": "namenode",
+  "site": "test",
+  "value": 0.96
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hadoop-metric/src/test/resources/integrate_test_policy.json
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hadoop-metric/src/test/resources/integrate_test_policy.json b/eagle-metric/eagle-hadoop-metric/src/test/resources/integrate_test_policy.json
new file mode 100644
index 0000000..5146ffa
--- /dev/null
+++ b/eagle-metric/eagle-hadoop-metric/src/test/resources/integrate_test_policy.json
@@ -0,0 +1,37 @@
+{
+  "name": "TEST_POLICY",
+  "description": "from HADOOP_JMX_METRIC_STREAM_SANDBOX[site==\"test\"] insert into ALERT_STREAM;",
+  "inputStreams": [
+    "HADOOP_JMX_METRIC_STREAM_SANDBOX"
+  ],
+  "outputStreams": [
+    "ALERT_STREAM"
+  ],
+  "definition": {
+    "type": "siddhi",
+    "value": "from HADOOP_JMX_METRIC_STREAM_SANDBOX[site==\"test\"] select component,value, name insert into ALERT_STREAM;",
+    "handlerClass": null,
+    "properties": {},
+    "inputStreams": [],
+    "outputStreams": []
+  },
+  "stateDefinition": null,
+  "policyStatus": "ENABLED",
+  "alertDefinition": {
+    "templateType": "TEXT",
+    "subject": "$component Disk Usage $value",
+    "body": "#set($usage_percentage = $value * 100)\r\n\r\nDisk Usage (<strong>$metric<strong>) reached <span style=\"color:red\">$usage_percentage %</span> (Threshold: 90%) on <strong>$component</strong> of cluster: <strong>$site</strong> on:\r\n<ul>\r\n    <li><strong>Hostname</strong>: $host</li>\r\n    <li><strong>When</strong>: $ALERT_TIME</li>\r\n    <li><strong>Root Cause</strong>: UNKNOWN</li>\r\n    <li><strong>Action Required</strong>: N/A</li>\r\n</ul>",
+    "severity": "CRITICAL",
+    "category": "HDFS"
+  },
+  "partitionSpec": [
+    {
+      "streamId": "HADOOP_JMX_METRIC_STREAM_SANDBOX",
+      "type": "SHUFFLE",
+      "columns": [],
+      "sortSpec": null
+    }
+  ],
+  "dedicated": false,
+  "parallelismHint": 5
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hbase-web/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hbase-web/pom.xml b/eagle-metric/eagle-hbase-web/pom.xml
new file mode 100644
index 0000000..9e61433
--- /dev/null
+++ b/eagle-metric/eagle-hbase-web/pom.xml
@@ -0,0 +1,57 @@
+<!--
+  ~ 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.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>eagle-metric-parent</artifactId>
+        <groupId>org.apache.eagle</groupId>
+        <version>0.5.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>eagle-hbase-web</artifactId>
+    <name>Eagle::App::HadoopMetric::HBase::WebUI</name>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-app-base</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-hadoop-metric</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.eagle</groupId>
+            <artifactId>eagle-topology-app</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/webapp/app</directory>
+                <targetPath>assets/</targetPath>
+            </resource>
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+        </resources>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hbase-web/src/main/java/org/apache/eagle/metric/HBaseMetricWebApplicationProvider.java
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hbase-web/src/main/java/org/apache/eagle/metric/HBaseMetricWebApplicationProvider.java b/eagle-metric/eagle-hbase-web/src/main/java/org/apache/eagle/metric/HBaseMetricWebApplicationProvider.java
new file mode 100644
index 0000000..6f53afa
--- /dev/null
+++ b/eagle-metric/eagle-hbase-web/src/main/java/org/apache/eagle/metric/HBaseMetricWebApplicationProvider.java
@@ -0,0 +1,23 @@
+/*
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ */
+package org.apache.eagle.metric;
+
+import org.apache.eagle.app.StaticApplicationProvider;
+
+public class HBaseMetricWebApplicationProvider extends StaticApplicationProvider {
+    // HBaseWebApplicationProvider SPI Interface
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hbase-web/src/main/resources/META-INF/providers/org.apache.eagle.metric.HBaseMetricWebApplicationProvider.xml
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hbase-web/src/main/resources/META-INF/providers/org.apache.eagle.metric.HBaseMetricWebApplicationProvider.xml b/eagle-metric/eagle-hbase-web/src/main/resources/META-INF/providers/org.apache.eagle.metric.HBaseMetricWebApplicationProvider.xml
new file mode 100644
index 0000000..564ce44
--- /dev/null
+++ b/eagle-metric/eagle-hbase-web/src/main/resources/META-INF/providers/org.apache.eagle.metric.HBaseMetricWebApplicationProvider.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ 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.
+  -->
+
+<application>
+    <type>HBASE_METRIC_WEB_APP</type>
+    <name>HBase Metric Monitoring Web </name>
+    <viewPath>/apps/hbase</viewPath>
+    <description>HBase Metric Monitoring Web</description>
+    <dependencies>
+        <dependency>
+            <type>HADOOP_METRIC_MONITOR</type>
+            <required>true</required>
+        </dependency>
+        <dependency>
+            <type>TOPOLOGY_HEALTH_CHECK_APP</type>
+            <required>true</required>
+        </dependency>
+    </dependencies>
+    <configuration>
+        <property>
+            <name>service.host</name>
+            <displayName>Eagle Service Host</displayName>
+            <description>Set additional eagle service host, default: using current host</description>
+        </property>
+        <property>
+            <name>service.port</name>
+            <displayName>Eagle Service Port</displayName>
+            <description>Set additional eagle service port, default: using current port</description>
+        </property>
+    </configuration>
+</application>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hbase-web/src/main/resources/META-INF/services/org.apache.eagle.app.spi.ApplicationProvider
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hbase-web/src/main/resources/META-INF/services/org.apache.eagle.app.spi.ApplicationProvider b/eagle-metric/eagle-hbase-web/src/main/resources/META-INF/services/org.apache.eagle.app.spi.ApplicationProvider
new file mode 100644
index 0000000..dcbdb63
--- /dev/null
+++ b/eagle-metric/eagle-hbase-web/src/main/resources/META-INF/services/org.apache.eagle.app.spi.ApplicationProvider
@@ -0,0 +1,16 @@
+# 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.
+
+org.apache.eagle.metric.HBaseMetricWebApplicationProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hbase-web/src/main/webapp/app/apps/hbase/config.json
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hbase-web/src/main/webapp/app/apps/hbase/config.json b/eagle-metric/eagle-hbase-web/src/main/webapp/app/apps/hbase/config.json
new file mode 100644
index 0000000..88b14f6
--- /dev/null
+++ b/eagle-metric/eagle-hbase-web/src/main/webapp/app/apps/hbase/config.json
@@ -0,0 +1,68 @@
+{
+	"master": {
+		"nonheap": "hadoop.memory.nonheapmemoryusage.used",
+		"heap": "hadoop.memory.heapmemoryusage.used",
+		"averageload": "hadoop.hbase.master.server.averageload",
+		"ritcount": "hadoop.hbase.master.assignmentmanger.ritcount",
+		"ritcountoverthreshold": "hadoop.hbase.master.assignmentmanger.ritcountoverthreshold",
+		"AssignNumOps": "hadoop.hbase.master.assignmentmanger.assign_num_ops",
+		"AssignMin": "hadoop.hbase.master.assignmentmanger.assign_min",
+		"AssignMax": "hadoop.hbase.master.assignmentmanger.assign_max",
+		"AssignPercentile75th": "hadoop.hbase.master.assignmentmanger.assign_75th_percentile",
+		"AssignPercentile95th": "hadoop.hbase.master.assignmentmanger.assign_95th_percentile",
+		"AssignPercentile99th": "hadoop.hbase.master.assignmentmanger.assign_99th_percentile",
+		"BulkAssignNum_ops": "hadoop.hbase.master.assignmentmanger.bulkassign_num_ops",
+		"BulkAssignMin": "hadoop.hbase.master.assignmentmanger.bulkassign_min",
+		"BulkAssignMax": "hadoop.hbase.master.assignmentmanger.bulkassign_max",
+		"BulkAssignPercentile75th": "hadoop.hbase.master.assignmentmanger.bulkassign_75th_percentile",
+		"BulkAssignPercentile95th": "hadoop.hbase.master.assignmentmanger.bulkassign_95th_percentile",
+		"BulkAssignPercentile99th": "hadoop.hbase.master.assignmentmanger.bulkassign_99th_percentile",
+		"BalancerClusterNum_ops": "hadoop.hbase.master.balancer.balancercluster_num_ops",
+		"BalancerClusterMin": "hadoop.hbase.master.balancer.balancercluster_min",
+		"BalancerClusterMax": "hadoop.hbase.master.balancer.balancercluster_max",
+		"BalancerClusterPercentile75th": "hadoop.hbase.master.balancer.balancercluster_75th_percentile",
+		"BalancerClusterPercentile95th": "hadoop.hbase.master.balancer.balancercluster_95th_percentile",
+		"BalancerClusterPercentile99th": "hadoop.hbase.master.balancer.balancercluster_99th_percentile",
+		"HlogSplitTimeMin": "hadoop.hbase.master.filesystem.hlogsplittime_min",
+		"HlogSplitTimeMax": "hadoop.hbase.master.filesystem.hlogsplittime_max",
+		"HlogSplitTimePercentile75th": "hadoop.hbase.master.filesystem.hlogsplittime_75th_percentile",
+		"HlogSplitTimePercentile95th": "hadoop.hbase.master.filesystem.hlogsplittime_95th_percentile",
+		"HlogSplitTimePercentile99th": "hadoop.hbase.master.filesystem.hlogsplittime_99th_percentile",
+		"HlogSplitSizeMin": "hadoop.hbase.master.filesystem.hlogsplitsize_min",
+		"HlogSplitSizeMax": "hadoop.hbase.master.filesystem.hlogsplitsize_max",
+		"MetaHlogSplitTimeMin": "hadoop.hbase.master.filesystem.metahlogsplittime_min",
+		"MetaHlogSplitTimeMax": "hadoop.hbase.master.filesystem.metahlogsplittime_max",
+		"MetaHlogSplitTimePercentile75th": "hadoop.hbase.master.filesystem.metahlogsplittime_75th_percentile",
+		"MetaHlogSplitTimePercentile95th": "hadoop.hbase.master.filesystem.metahlogsplittime_95th_percentile",
+		"MetaHlogSplitTimePercentile99th": "hadoop.hbase.master.filesystem.metahlogsplittime_99th_percentile",
+		"MetaHlogSplitSizeMin": "hadoop.hbase.master.filesystem.metahlogsplitsize_min",
+		"MetaHlogSplitSizeMax": "hadoop.hbase.master.filesystem.metahlogsplitsize_max"
+	},
+	"regionserver": {
+		"nonheap" : "hadoop.memory.nonheapmemoryusage.used",
+		"heap" : "hadoop.memory.heapmemoryusage.used",
+		"directmemory" : "hadoop.bufferpool.direct.memoryused",
+		"GCCount" : "hadoop.hbase.jvm.gccount",
+		"GCTimeMillis" : "hadoop.hbase.jvm.gctimemillis",
+		"QueueSize" : "hadoop.hbase.regionserver.ipc.queuesize",
+		"NumCallsInGeneralQueue" : "hadoop.hbase.regionserver.ipc.numcallsingeneralqueue",
+		"NumActiveHandler" : "hadoop.hbase.regionserver.ipc.numactivehandler",
+		"IPCQueueTime99th" : "hadoop.hbase.regionserver.ipc.queuecalltime_99th_percentile",
+		"IPCProcessTime99th" : "hadoop.hbase.regionserver.ipc.processcalltime_99th_percentile",
+		"QueueCallTime_num_ops" : "hadoop.hbase.regionserver.ipc.queuecalltime_num_ops",
+		"ProcessCallTime_num_ops" : "hadoop.hbase.regionserver.ipc.processcalltime_num_ops",
+		"RegionCount" : "hadoop.hbase.regionserver.server.regioncount",
+		"StoreCount" : "hadoop.hbase.regionserver.server.storecount",
+		"MemStoreSize" : "hadoop.hbase.regionserver.server.memstoresize",
+		"StoreFileSize" : "hadoop.hbase.regionserver.server.storefilesize",
+		"TotalRequestCount" : "hadoop.hbase.regionserver.server.totalrequestcount",
+		"ReadRequestCount" : "hadoop.hbase.regionserver.server.readrequestcount",
+		"WriteRequestCount" : "hadoop.hbase.regionserver.server.writerequestcount",
+		"SlitQueueLength" : "hadoop.hbase.regionserver.server.splitqueuelength",
+		"CompactionQueueLength" : "hadoop.hbase.regionserver.server.compactionqueuelength",
+		"FlushQueueLength" : "hadoop.hbase.regionserver.server.flushqueuelength",
+		"BlockCacheSize" : "hadoop.hbase.regionserver.server.blockcachesize",
+		"BlockCacheHitCount" : "hadoop.hbase.regionserver.server.blockcachehitcount",
+		"BlockCacheCountHitPercent" : "hadoop.hbase.regionserver.server.blockcounthitpercent"
+	}
+}

http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-metric/eagle-hbase-web/src/main/webapp/app/apps/hbase/ctrls/backupMasterListCtrl.js
----------------------------------------------------------------------
diff --git a/eagle-metric/eagle-hbase-web/src/main/webapp/app/apps/hbase/ctrls/backupMasterListCtrl.js b/eagle-metric/eagle-hbase-web/src/main/webapp/app/apps/hbase/ctrls/backupMasterListCtrl.js
new file mode 100644
index 0000000..ca6c47e
--- /dev/null
+++ b/eagle-metric/eagle-hbase-web/src/main/webapp/app/apps/hbase/ctrls/backupMasterListCtrl.js
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+(function () {
+	/**
+	 * `register` without params will load the module which using require
+	 */
+	register(function (hadoopMetricApp) {
+
+		hadoopMetricApp.controller("backupMasterListCtrl", function ($wrapState, $scope, PageConfig, METRIC) {
+
+			// Initialization
+			PageConfig.title = "HBASE BackupMasters";
+			$scope.tableScope = {};
+			$scope.site = $wrapState.param.siteId;
+			$scope.searchPathList = [["tags", "hostname"], ["tags", "rack"], ["tags", "site"], ["status"]];
+			$scope.backupMasterList = METRIC.hbaseMaster($scope.site, "standby", 1000);
+		});
+	});
+})();