[EAGLE-900] Only show left navigation item (HDFS, HBase) when we install the JMX application
[EAGLE-900] Only show left navigation item (HDFS, HBase) when we install the JMX application - Refactor eagle-hadoop-metric to single app for every service, for example, there is a eagle-hadoop-metric before, now eagle-hadoop-metric is split into eagle-hadoop-metric, eagle-hdfs-metric and eagle-hbase-metric, we can see HBase navigation item only if we install eagle-hbase-metric. https://issues.apache.org/jira/browse/EAGLE-900 Author: chitin <[email protected]> Closes #825 from chitin/eagle900-2. Project: http://git-wip-us.apache.org/repos/asf/eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/eagle/commit/c32b7152 Tree: http://git-wip-us.apache.org/repos/asf/eagle/tree/c32b7152 Diff: http://git-wip-us.apache.org/repos/asf/eagle/diff/c32b7152 Branch: refs/heads/master Commit: c32b7152595bb074745523cfd9d829484458d90e Parents: c0198a0 Author: chitin <[email protected]> Authored: Wed Feb 22 06:28:30 2017 +0000 Committer: r7raul1984 <[email protected]> Committed: Wed Feb 22 06:28:30 2017 +0000 ---------------------------------------------------------------------- eagle-hadoop-metric/pom.xml | 67 ---- .../eagle/metric/HadoopMetricMonitorApp.java | 41 --- .../metric/HadoopMetricMonitorAppProdiver.java | 29 -- ...le.metric.HadoopMetricMonitorAppProdiver.xml | 156 --------- ...org.apache.eagle.app.spi.ApplicationProvider | 16 - .../src/main/resources/datasources.json | 19 -- .../src/main/resources/policies.json | 169 ---------- .../src/main/resources/publishments.json | 33 -- .../src/main/resources/streamdefinitions.json | 47 --- .../webapp/app/apps/hadoop_metric/.editorconfig | 27 -- .../webapp/app/apps/hadoop_metric/config.json | 68 ---- .../hadoop_metric/ctrls/backupMasterListCtrl.js | 35 -- .../webapp/app/apps/hadoop_metric/ctrls/hdfs.js | 28 -- .../app/apps/hadoop_metric/ctrls/overview.js | 298 ---------------- .../hadoop_metric/ctrls/regionDetailCtrl.js | 286 ---------------- .../apps/hadoop_metric/ctrls/regionListCtrl.js | 38 --- .../main/webapp/app/apps/hadoop_metric/index.js | 337 ------------------- .../partials/backupMasterList.html | 52 --- .../apps/hadoop_metric/partials/hdfs/index.html | 19 -- .../apps/hadoop_metric/partials/overview.html | 111 ------ .../partials/region/regionDetail.html | 117 ------- .../partials/region/regionList.html | 53 --- .../app/apps/hadoop_metric/style/index.css | 88 ----- .../hadoop_metric/widgets/availabilityChart.js | 145 -------- .../src/main/webapp/app/apps/index.html | 6 - .../metric/HadoopMetricMonitorAppDebug.java | 23 -- .../HadoopMetricMonitorAppProviderTest.java | 89 ----- .../eagle/metric/SendSampleDataToKafka.java | 56 --- .../src/test/resources/application.conf | 49 --- .../resources/hadoop_jmx_metric_sample.json | 8 - .../test/resources/integrate_test_policy.json | 37 -- eagle-metric/eagle-hadoop-metric/pom.xml | 34 ++ .../eagle/metric/HadoopMetricMonitorApp.java | 41 +++ .../metric/HadoopMetricMonitorAppProdiver.java | 29 ++ ...le.metric.HadoopMetricMonitorAppProdiver.xml | 149 ++++++++ ...org.apache.eagle.app.spi.ApplicationProvider | 16 + .../src/main/resources/datasources.json | 19 ++ .../src/main/resources/policies.json | 169 ++++++++++ .../src/main/resources/publishments.json | 33 ++ .../src/main/resources/streamdefinitions.json | 47 +++ .../metric/HadoopMetricMonitorAppDebug.java | 23 ++ .../HadoopMetricMonitorAppProviderTest.java | 89 +++++ .../eagle/metric/SendSampleDataToKafka.java | 56 +++ .../src/test/resources/application.conf | 49 +++ .../resources/hadoop_jmx_metric_sample.json | 8 + .../test/resources/integrate_test_policy.json | 37 ++ eagle-metric/eagle-hbase-web/pom.xml | 57 ++++ .../HBaseMetricWebApplicationProvider.java | 23 ++ ...metric.HBaseMetricWebApplicationProvider.xml | 46 +++ ...org.apache.eagle.app.spi.ApplicationProvider | 16 + .../src/main/webapp/app/apps/hbase/config.json | 68 ++++ .../apps/hbase/ctrls/backupMasterListCtrl.js | 35 ++ .../webapp/app/apps/hbase/ctrls/overview.js | 298 ++++++++++++++++ .../app/apps/hbase/ctrls/regionDetailCtrl.js | 306 +++++++++++++++++ .../app/apps/hbase/ctrls/regionListCtrl.js | 38 +++ .../src/main/webapp/app/apps/hbase/index.html | 6 + .../src/main/webapp/app/apps/hbase/index.js | 329 ++++++++++++++++++ .../apps/hbase/partials/backupMasterList.html | 52 +++ .../app/apps/hbase/partials/overview.html | 111 ++++++ .../hbase/partials/region/regionDetail.html | 117 +++++++ .../apps/hbase/partials/region/regionList.html | 53 +++ .../main/webapp/app/apps/hbase/style/index.css | 88 +++++ .../app/apps/hbase/widgets/availabilityChart.js | 145 ++++++++ .../src/main/webapp/package.json | 0 .../HBaseMetricWebApplicationProviderTest.java | 100 ++++++ eagle-metric/eagle-hdfs-web/pom.xml | 57 ++++ .../HdfsMetricWebApplicationProvider.java | 23 ++ ....metric.HdfsMetricWebApplicationProvider.xml | 46 +++ ...org.apache.eagle.app.spi.ApplicationProvider | 16 + .../main/webapp/app/apps/hdfs/ctrl/overview.js | 29 ++ .../src/main/webapp/app/apps/hdfs/index.html | 6 + .../src/main/webapp/app/apps/hdfs/index.js | 42 +++ .../webapp/app/apps/hdfs/partials/overview.html | 17 + .../main/webapp/app/apps/hdfs/style/index.css | 88 +++++ .../app/apps/hdfs/widget/availabilityChart.js | 105 ++++++ .../eagle-hdfs-web/src/main/webapp/package.json | 0 .../HdfsMetricWebApplicationProviderTest.java | 101 ++++++ eagle-metric/pom.xml | 74 ++++ eagle-server/pom.xml | 11 + ...org.apache.eagle.app.spi.ApplicationProvider | 6 +- pom.xml | 2 +- 81 files changed, 3308 insertions(+), 2549 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/pom.xml ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/pom.xml b/eagle-hadoop-metric/pom.xml deleted file mode 100644 index 0677f3b..0000000 --- a/eagle-hadoop-metric/pom.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?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-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> - <exclusions> - <exclusion> - <groupId>ch.qos.logback</groupId> - <artifactId>logback-classic</artifactId> - </exclusion> - <exclusion> - <groupId>ch.qos.logback</groupId> - <artifactId>logback-core</artifactId> - </exclusion> - <exclusion> - <groupId>org.ow2.asm</groupId> - <artifactId>asm</artifactId> - </exclusion> - </exclusions> - </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-hadoop-metric/src/main/java/org/apache/eagle/metric/HadoopMetricMonitorApp.java ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/src/main/java/org/apache/eagle/metric/HadoopMetricMonitorApp.java b/eagle-hadoop-metric/src/main/java/org/apache/eagle/metric/HadoopMetricMonitorApp.java deleted file mode 100644 index 5aa27a3..0000000 --- a/eagle-hadoop-metric/src/main/java/org/apache/eagle/metric/HadoopMetricMonitorApp.java +++ /dev/null @@ -1,41 +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 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-hadoop-metric/src/main/java/org/apache/eagle/metric/HadoopMetricMonitorAppProdiver.java ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/src/main/java/org/apache/eagle/metric/HadoopMetricMonitorAppProdiver.java b/eagle-hadoop-metric/src/main/java/org/apache/eagle/metric/HadoopMetricMonitorAppProdiver.java deleted file mode 100644 index dc7ea97..0000000 --- a/eagle-hadoop-metric/src/main/java/org/apache/eagle/metric/HadoopMetricMonitorAppProdiver.java +++ /dev/null @@ -1,29 +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 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-hadoop-metric/src/main/resources/META-INF/providers/org.apache.eagle.metric.HadoopMetricMonitorAppProdiver.xml ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/src/main/resources/META-INF/providers/org.apache.eagle.metric.HadoopMetricMonitorAppProdiver.xml b/eagle-hadoop-metric/src/main/resources/META-INF/providers/org.apache.eagle.metric.HadoopMetricMonitorAppProdiver.xml deleted file mode 100644 index 8262da9..0000000 --- a/eagle-hadoop-metric/src/main/resources/META-INF/providers/org.apache.eagle.metric.HadoopMetricMonitorAppProdiver.xml +++ /dev/null @@ -1,156 +0,0 @@ -<?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> - <viewPath>/apps/hadoop_metric</viewPath> - <dependencies> - <dependency> - <type>TOPOLOGY_HEALTH_CHECK_APP</type> - <required>true</required> - </dependency> - </dependencies> - <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-hadoop-metric/src/main/resources/META-INF/services/org.apache.eagle.app.spi.ApplicationProvider ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/src/main/resources/META-INF/services/org.apache.eagle.app.spi.ApplicationProvider b/eagle-hadoop-metric/src/main/resources/META-INF/services/org.apache.eagle.app.spi.ApplicationProvider deleted file mode 100644 index 25d911d..0000000 --- a/eagle-hadoop-metric/src/main/resources/META-INF/services/org.apache.eagle.app.spi.ApplicationProvider +++ /dev/null @@ -1,16 +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. - -org.apache.eagle.metric.HadoopMetricMonitorAppProdiver \ No newline at end of file http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/src/main/resources/datasources.json ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/src/main/resources/datasources.json b/eagle-hadoop-metric/src/main/resources/datasources.json deleted file mode 100644 index 5c10696..0000000 --- a/eagle-hadoop-metric/src/main/resources/datasources.json +++ /dev/null @@ -1,19 +0,0 @@ -[ - { - "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-hadoop-metric/src/main/resources/policies.json ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/src/main/resources/policies.json b/eagle-hadoop-metric/src/main/resources/policies.json deleted file mode 100644 index 811ffb0..0000000 --- a/eagle-hadoop-metric/src/main/resources/policies.json +++ /dev/null @@ -1,169 +0,0 @@ -[ - { - "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-hadoop-metric/src/main/resources/publishments.json ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/src/main/resources/publishments.json b/eagle-hadoop-metric/src/main/resources/publishments.json deleted file mode 100644 index 10d16a4..0000000 --- a/eagle-hadoop-metric/src/main/resources/publishments.json +++ /dev/null @@ -1,33 +0,0 @@ -[ - { - "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": "[email protected]", - "recipients": "[email protected]", - "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-hadoop-metric/src/main/resources/streamdefinitions.json ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/src/main/resources/streamdefinitions.json b/eagle-hadoop-metric/src/main/resources/streamdefinitions.json deleted file mode 100644 index 66a2c98..0000000 --- a/eagle-hadoop-metric/src/main/resources/streamdefinitions.json +++ /dev/null @@ -1,47 +0,0 @@ -[ - { - "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-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/.editorconfig ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/.editorconfig b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/.editorconfig deleted file mode 100644 index 42a9b69..0000000 --- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/.editorconfig +++ /dev/null @@ -1,27 +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. - -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = tab -indent_size = 4 - -[*.md] -trim_trailing_whitespace = false http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/config.json ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/config.json b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/config.json deleted file mode 100644 index 88b14f6..0000000 --- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/config.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "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-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/ctrls/backupMasterListCtrl.js ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/ctrls/backupMasterListCtrl.js b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/ctrls/backupMasterListCtrl.js deleted file mode 100644 index ca6c47e..0000000 --- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/ctrls/backupMasterListCtrl.js +++ /dev/null @@ -1,35 +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) { - - 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); - }); - }); -})(); http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/ctrls/hdfs.js ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/ctrls/hdfs.js b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/ctrls/hdfs.js deleted file mode 100644 index 74bb7bf..0000000 --- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/ctrls/hdfs.js +++ /dev/null @@ -1,28 +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) { - hadoopMetricApp.controller("hdfsCtrl", function ($scope, PageConfig) { - PageConfig.title = 'HDFS'; - }); - }); -})(); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/ctrls/overview.js ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/ctrls/overview.js b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/ctrls/overview.js deleted file mode 100644 index 6e7df0b..0000000 --- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/ctrls/overview.js +++ /dev/null @@ -1,298 +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) { - hadoopMetricApp.controller("overviewCtrl", function ($q, $wrapState, $scope, PageConfig, METRIC, Time) { - var cache = {}; - $scope.site = $wrapState.param.siteId; - var activeMasterInfo = METRIC.hbaseMaster($scope.site, "active", 1); - - PageConfig.title = 'HBase'; - var storageOption = { - animation: false, - tooltip: { - formatter: function (points) { - return points[0].name + "<br/>" + - $.map(points, function (point) { - return '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:' + point.color + '"></span> ' + - point.seriesName + ": " + - common.number.abbr(point.value, true, 0); - }).reverse().join("<br/>"); - } - }, - yAxis: [{ - axisLabel: { - formatter: function (value) { - return common.number.abbr(value, true); - } - } - }] - }; - - - function generateHbaseMetric(name, flag) { - var startTime = Time.startTime(); - var endTime = Time.endTime(); - var interval = Time.diffInterval(startTime, endTime); - var intervalMin = interval / 1000 / 60; - var trendStartTime = Time.align(startTime, interval); - var trendEndTime = Time.align(endTime, interval); - - $scope.site = $wrapState.param.siteId; - var result = cache[name] || activeMasterInfo._promise.then(function (res) { - var hostname = cache[hostname] = cache[hostname] || res[0].tags.hostname; - $scope.defaultHostname = $wrapState.param.hostname || hostname; - - var jobCond = { - site: $scope.site, - component: "hbasemaster", - host: $scope.defaultHostname - }; - return METRIC.aggMetricsToEntities(METRIC.hbaseMetricsAggregation(jobCond, name, ["site"], "avg(value)", intervalMin, trendStartTime, trendEndTime), flag) - ._promise.then(function (list) { - var metricFlag = $.map(list, function (metrics) { - return metrics[0].flag; - }); - return [metricFlag, list]; - }); - }); - return result; - } - - function mergeMetricToOneSeries(metricTitle, metrics, legendName, dataOption, option) { - var series = []; - - $.each(metrics, function (i, metricMap) { - if (typeof metricMap !== 'undefined') { - series.push(METRIC.metricsToSeries(legendName[i], metricMap[0], option)); - } - }); - return { - title: metricTitle, - series: series, - option: dataOption || {}, - loading: false - }; - } - - function countHBaseRole(site, status, role, groups, filed, limit) { - var jobCond = { - site: site, - status: status, - role: role - }; - return METRIC.aggHBaseInstance(jobCond, groups, filed, limit); - } - - function sumAllRegions(site, role, groups, filed, limit) { - var jobCond = { - site: site, - role: role - }; - return METRIC.aggHBaseInstance(jobCond, groups, filed, limit); - } - - // TODO: Optimize the chart count - // TODO: ECharts dynamic refresh series bug: https://github.com/ecomfe/echarts/issues/4033 - $scope.chartList = [ - { - name: "MemoryUsage", - metrics: ["nonheap", "heap"], - linename: ["nonheap", "heap"], - option: storageOption - }, - { - name: "Master Averageload", - metrics: ["averageload"], - linename: ["averageload"], - option: {} - }, - { - name: "Ritcount", - metrics: ["ritcount", "ritcountoverthreshold"], - linename: ["ritcount", "ritcountoverthreshold"], - option: {} - }, - { - name: "AssignOpsNum", - metrics: ["AssignNumOps"], - linename: ["numOps"], - option: {} - }, - { - name: "Assign", - metrics: ["AssignMin", "AssignMax", "AssignPercentile75th", "AssignPercentile95th", "AssignPercentile99th"], - linename: ["min", "max", "75th", "95th", "99th"], - option: {} - }, - { - name: "BulkAssignOpsNum", - metrics: ["BulkAssignNum_ops"], - linename: ["num_ops"], - option: {} - }, - { - name: "BulkAssign", - metrics: ["BulkAssignMin", "BulkAssignMax", "BulkAssignPercentile75th", "BulkAssignPercentile95th", "BulkAssignPercentile99th"], - linename: ["min", "max", "75th", "95th", "99th"], - option: {} - }, - { - name: "BalancerClusterOpsNum", - metrics: ["BalancerClusterNum_ops"], - linename: ["num_ops"], - option: {} - }, - { - name: "BalancerCluster", - metrics: ["BalancerClusterMin", "BalancerClusterMax", "BalancerClusterPercentile75th", "BalancerClusterPercentile95th", "BalancerClusterPercentile99th"], - linename: ["min", "max", "75th", "95th", "99th"], - option: {} - }, - { - name: "HlogSplitTime", - metrics: ["HlogSplitTimeMin", "HlogSplitTimeMax"], - linename: ["HlogSplitTime_min", "HlogSplitTime_max"], - option: {} - }, - { - name: "HlogSplitTime Percentile", - metrics: ["HlogSplitTimePercentile75th", "HlogSplitTimePercentile95th", "HlogSplitTimePercentile99th"], - linename: ["75th", "95th", "99th"], - option: {} - }, - { - name: "HlogSplitSize", - metrics: ["HlogSplitSizeMin","HlogSplitSizeMax"], - linename: ["Min", "Max"], - option: {} - }, - { - name: "MetaHlogSplitTime", - metrics: ["MetaHlogSplitTimeMin", "MetaHlogSplitTimeMax"], - linename: ["Min", "Max"], - option: {} - }, - { - name: "MetaHlogSplitTime Percentile", - metrics: ["MetaHlogSplitTimePercentile75th", "MetaHlogSplitTimePercentile95th", "MetaHlogSplitTimePercentile99th"], - linename: ["75th", "95th", "99th"], - option: {} - }, - { - name: "MetaHlogSplitSize", - metrics: ["MetaHlogSplitSizeMin", "MetaHlogSplitSizeMax"], - linename: ["Min", "Max"], - option: {} - } - ]; - $scope.metricList = []; - $.each($scope.chartList, function (i) { - var chart = $scope.chartList[i]; - var chartname = chart.name; - $scope.metricList[chartname] = { - title: chartname, - series: {}, - option: {}, - loading: true, - promises: [] - }; - }); - $scope.refresh = function () { - - METRIC.getMetricObj().then(function (res) { - var masterMetricList = res.master; - $.each($scope.chartList, function (i) { - var chart = $scope.chartList[i]; - var metricList = chart.metrics; - $.each(metricList, function (j) { - var metricKey = metricList[j]; - var metricspromies = generateHbaseMetric(masterMetricList[metricKey], metricKey); - var chartname = chart.name; - $scope.metricList[chartname].promises.push(metricspromies); - }); - }); - - $.each($scope.chartList, function (k) { - var chart = $scope.chartList[k]; - var chartname = chart.name; - $q.all($scope.metricList[chartname].promises).then(function (resp) { - var series = []; - for (var r = 0; r < resp.length; r += 1) { - var rs = resp[r][1]; - if (rs.length > 0) { - series.push(rs); - } - } - $scope.metricList[chartname] = mergeMetricToOneSeries(chartname, series, chart.linename, chart.option); - }); - }); - }); - - countHBaseRole($scope.site, "active", "hmaster", ["site"], "count")._promise.then(function (res) { - $.map(res, function (data) { - $scope.hmasteractivenum = data.value[0]; - }); - }); - countHBaseRole($scope.site, "standby", "hmaster", ["site"], "count")._promise.then(function (res) { - $.map(res, function (data) { - $scope.hmasterstandbynum = data.value[0]; - }); - }); - - countHBaseRole($scope.site, "live", "regionserver", ["site"], "count")._promise.then(function (res) { - $.map(res, function (data) { - $scope.regionserverhealtynum = data.value[0]; - }); - }); - countHBaseRole($scope.site, "dead", "regionserver", ["site"], "count")._promise.then(function (res) { - $.map(res, function (data) { - $scope.regionserverunhealtynum = data.value[0]; - }); - }); - sumAllRegions($scope.site, "regionserver", ["site"], "sum(numRegions)")._promise.then(function (res) { - $.map(res, function (data) { - $scope.regionsnum = data.value[0]; - }); - }); - - activeMasterInfo._promise.then(function (res) { - var hostname = cache[hostname] = cache[hostname] || res[0].tags.hostname; - $scope.defaultHostname = $wrapState.param.hostname || hostname; - var jobCond = { - site: $scope.site, - component: "hbasemaster", - host: $scope.defaultHostname - }; - METRIC.hbaseMomentMetric(jobCond, "hadoop.hbase.master.server.averageload", 1).then(function (res) { - $scope.hmasteraverageload = (typeof res.data.obj[0] !== 'undefined') ? res.data.obj[0].value[0] : "-1"; - }); - }); - }; - Time.onReload(function () { - cache = {}; - $scope.refresh(); - }, $scope); - $scope.refresh(); - }); - }); -})(); http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/ctrls/regionDetailCtrl.js ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/ctrls/regionDetailCtrl.js b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/ctrls/regionDetailCtrl.js deleted file mode 100644 index 42d5367..0000000 --- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/ctrls/regionDetailCtrl.js +++ /dev/null @@ -1,286 +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) { - hadoopMetricApp.controller("regionDetailCtrl", function ($q, $wrapState, $scope, PageConfig, Time, METRIC) { - var cache = {}; - $scope.site = $wrapState.param.siteId; - $scope.hostname = $wrapState.param.hostname; - PageConfig.title = 'RegionServer ' + "(" + $scope.hostname + ")"; - Time.autoRefresh = false; - - var sizeoption = { - animation: false, - tooltip: { - formatter: function (points) { - return points[0].name + "<br/>" + - $.map(points, function (point) { - return '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:' + point.color + '"></span> ' + - point.seriesName + ": " + - common.number.abbr(point.value, true); - }).reverse().join("<br/>"); - } - }, - legend: { - x: 'center', y: 'bottom' - }, - areaStyle: {normal: {}}, - yAxis: [{ - axisLabel: { - formatter: function (value) { - return common.number.abbr(value, true); - } - } - }] - }; - - var gctimeoption = { - legend: { - x: 'center', y: 'bottom' - }, - yAxis: [{ - axisLabel: { - formatter: function (value) { - return value / 1000 + ' S'; - } - } - }] - }; - $scope.chartList = [ - { - name: "Memory Usage", - metrics: ["nonheap", "heap"], - option: sizeoption - }, - { - name: "Direct Memory Usage", - metrics: ["directmemory"], - option: sizeoption - }, - { - name: "GC count", - metrics: ["GCCount"], - option: {} - }, - { - name: "GC TimeMillis", - metrics: ["GCTimeMillis"], - option: gctimeoption - }, - { - name: "QueueSize", - metrics: ["QueueSize"], - option: {} - }, - { - name: "NumCallsInGeneralQueue", - metrics: ["NumCallsInGeneralQueue"], - option: {} - }, - { - name: "NumActiveHandler", - metrics: ["NumActiveHandler"], - option: {} - }, - { - name: "IPC Queue Time (99th)", - metrics: ["IPCQueueTime99th"], - option: {} - }, - { - name: "IPC Process Time (99th)", - metrics: ["IPCProcessTime99th"], - option: {} - }, - { - name: "QueueCallTime_num_ops", - metrics: ["QueueCallTime_num_ops"], - option: {} - }, - { - name: "ProcessCallTime_num_ops", - metrics: ["ProcessCallTime_num_ops"], - option: {} - }, - { - name: "RegionCount", - metrics: ["RegionCount"], - option: {} - }, - { - name: "StoreCount", - metrics: ["StoreCount"], - option: {} - }, - { - name: "MemStoreSize", - metrics: ["MemStoreSize"], - option: sizeoption - }, - { - name: "StoreFileSize", - metrics: ["StoreFileSize"], - option: sizeoption - }, - { - name: "TotalRequestCount", - metrics: ["TotalRequestCount"], - option: {} - }, - { - name: "ReadRequestCount", - metrics: ["ReadRequestCount"], - option: {} - }, - { - name: "WriteRequestCount", - metrics: ["WriteRequestCount"], - option: {} - }, - { - name: "SlitQueueLength", - metrics: ["SlitQueueLength"], - option: {} - }, - { - name: "CompactionQueueLength", - metrics: ["CompactionQueueLength"], - option: {} - }, - { - name: "FlushQueueLength", - metrics: ["FlushQueueLength"], - option: {} - }, - { - name: "BlockCacheSize", - metrics: ["BlockCacheSize"], - option: sizeoption - }, - { - name: "BlockCacheHitCount", - metrics: ["BlockCacheHitCount"], - option: {} - }, - { - name: "BlockCacheCountHitPercent", - metrics: ["BlockCacheCountHitPercent"], - option: {} - } - ]; - - $scope.metricList = []; - $.each($scope.chartList, function (i) { - var chart = $scope.chartList[i]; - var chartname = chart.name; - $scope.metricList[chartname] = { - title: chartname, - series: {}, - option: {}, - loading: true, - promises: [] - }; - }); - $scope.refresh = function () { - var startTime = Time.startTime(); - var endTime = Time.endTime(); - - METRIC.getMetricObj().then(function (res) { - var masterMetricList = res.regionserver; - $.each($scope.chartList, function (i) { - var chart = $scope.chartList[i]; - var metricList = chart.metrics; - $.each(metricList, function (j) { - var metricKey = metricList[j]; - var metricspromies = generateHbaseMetric(masterMetricList[metricKey], startTime, endTime, metricKey); - var chartname = chart.name; - $scope.metricList[chartname].promises.push(metricspromies); - }); - }); - - $.each($scope.chartList, function (k) { - var chart = $scope.chartList[k]; - var chartname = chart.name; - $q.all($scope.metricList[chartname].promises).then(function (resp) { - var series = []; - for (var r = 0; r < resp.length; r += 1) { - var rs = resp[r][1]; - if (rs.length > 0) { - series.push(rs); - } - } - $scope.metricList[chartname] = mergeSeries(chartname, series, chart.metrics, chart.option); - }); - }); - }); - - METRIC.regionserverStatus($scope.hostname, $scope.site)._promise.then(function (res) { - $scope.regionstatus = res; - }); - }; - Time.onReload(function () { - cache = {}; - $scope.refresh(); - }, $scope); - $scope.refresh(); - - - function generateHbaseMetric(name, startTime, endTime, flag) { - var interval = Time.diffInterval(startTime, endTime); - var intervalMin = interval / 1000 / 60; - var trendStartTime = Time.align(startTime, interval); - var trendEndTime = Time.align(endTime, interval); - - var condition = { - site: $scope.site, - component: "regionserver", - host: $scope.hostname - }; - return METRIC.aggMetricsToEntities(METRIC.hbaseMetricsAggregation(condition, name, ["site"], "avg(value)", intervalMin, trendStartTime, trendEndTime), flag) - ._promise.then(function (list) { - var metricFlag = $.map(list, function (metrics) { - return metrics[0].flag; - }); - return [metricFlag, list]; - }); - } - - function mergeSeries(title, metrics, linename, option) { - var series = []; - $.each(metrics, function (i, metricMap) { - $.map(metricMap, function (metric) { - if (typeof metric !== 'undefined') { - series.push(METRIC.metricsToSeries(linename[i], metric, option)); - } - }); - }); - return { - title: title, - series: series, - option: option || {}, - loading: false - }; - } - }); - }); -}) -(); http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/ctrls/regionListCtrl.js ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/ctrls/regionListCtrl.js b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/ctrls/regionListCtrl.js deleted file mode 100644 index 1477e32..0000000 --- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/ctrls/regionListCtrl.js +++ /dev/null @@ -1,38 +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) { - - hadoopMetricApp.controller("regionListCtrl", function ($wrapState, $scope, PageConfig, METRIC) { - - // Initialization - PageConfig.title = "HBASE RegionServers"; - $scope.tableScope = {}; - $scope.live = METRIC.STATUS_LIVE; - $scope.dead = METRIC.STATUS_DEAD; - $scope.site = $wrapState.param.siteId; - $scope.searchPathList = [["tags", "hostname"], ["tags", "rack"], ["tags", "site"], ["status"]]; - $scope.regionserverList = METRIC.regionserverList($scope.site); - - }); - }); -})(); http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js deleted file mode 100644 index d4789b2..0000000 --- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js +++ /dev/null @@ -1,337 +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` is global function that for application to set up 'controller', 'service', 'directive', 'route' in Eagle - */ - var hadoopMetricApp = register(['ngRoute', 'ngAnimate', 'ui.router', 'eagle.service']); - - hadoopMetricApp.route("HadoopMetric", { - url: "/hadoopService/HBase/overview?startTime&endTime", - site: true, - templateUrl: "partials/overview.html", - controller: "overviewCtrl", - resolve: {time: true} - }).route("HadoopMetric_HDFS", { - url: "/hadoopService/hdfs", - site: true, - templateUrl: "partials/hdfs/index.html", - controller: "hdfsCtrl", - resolve: {time: true} - }).route("regionDetail", { - url: "/hadoopService/HBase/regionDetail/:hostname", - site: true, - templateUrl: "partials/region/regionDetail.html", - controller: "regionDetailCtrl", - resolve: {time: true} - }).route("regionList", { - url: "/hadoopService/HBase/regionList", - site: true, - templateUrl: "partials/region/regionList.html", - controller: "regionListCtrl" - }).route("backupMasterList", { - url: "/hadoopService/HBase/backupMasterList", - site: true, - templateUrl: "partials/backupMasterList.html", - controller: "backupMasterListCtrl" - }).route("masterDetail", { - url: "/hadoopService/HBase/:hostname?startTime&endTime", - site: true, - reloadOnSearch: false, - templateUrl: "partials/overview.html", - controller: "overviewCtrl", - resolve: {time: true} - }); - - hadoopMetricApp.portal({ - name: "Services", icon: "heartbeat", list: [ - {name: "HBase", path: "hadoopService/HBase/overview"}, - {name: "HDFS", path: "hadoopService/hdfs"} - ] - }, true); - - hadoopMetricApp.service("METRIC", function ($q, $http, Time, Site, Application) { - var METRIC = window._METRIC = {}; - METRIC.STATUS_LIVE = "live"; - METRIC.STATUS_DEAD = "dead"; - METRIC.QUERY_HBASE_METRICS = '${baseURL}/rest/entities?query=GenericMetricService[${condition}]{*}&metricName=${metric}&pageSize=${limit}'; - METRIC.QUERY_HBASE_METRICS_WITHTIME = '${baseURL}/rest/entities?query=GenericMetricService[${condition}]{*}&metricName=${metric}&pageSize=${limit}&startTime=${startTime}&endTime=${endTime}'; - METRIC.QUERY_HBASE_INSTANCE = '${baseURL}/rest/entities?query=HbaseServiceInstance[${condition}]{*}&pageSize=${limit}'; - METRIC.QUERY_HBASE_INSTANCE_AGG = "${baseURL}/rest/entities?query=HbaseServiceInstance[${condition}]<${groups}>{${field}}&pageSize=${limit}"; - METRIC.QUERY_HBASE_METRICS_INTERVAL = '${baseURL}/rest/entities?query=GenericMetricService[${condition}]<${groups}>{${field}}${order}${top}&metricName=${metric}&pageSize=${limit}&startTime=${startTime}&endTime=${endTime}&intervalmin=${intervalMin}&timeSeries=true'; - /** - * Fetch query content with current site application configuration - * @param {string} queryName - */ - var getQuery = METRIC.getQuery = function (queryName, siteId) { - var baseURL; - siteId = siteId || Site.current().siteId; - var app = Application.find("HADOOP_METRIC_MONITOR", siteId)[0]; - var host = app.configuration["service.host"]; - var port = app.configuration["service.port"]; - - if (!host && !port) { - baseURL = ""; - } else { - if (host === "localhost" || !host) { - host = location.hostname; - } - if (!port) { - port = location.port; - } - baseURL = "http://" + host + ":" + port; - } - - return common.template(METRIC["QUERY_" + queryName], {baseURL: baseURL}); - }; - - function wrapList(promise) { - var _list = []; - _list._done = false; - - _list._promise = promise.then( - /** - * @param {{}} res - * @param {{}} res.data - * @param {{}} res.data.obj - */ - function (res) { - _list.splice(0); - Array.prototype.push.apply(_list, res.data.obj); - _list._done = true; - return _list; - }); - return _list; - } - - function toFields(fields) { - return (fields || []).length > 0 ? $.map(fields, function (field) { - return "@" + field; - }).join(",") : "*"; - } - - METRIC.metricsToSeries = function (name, metrics, option, rawData) { - if (arguments.length === 4 && typeof rawData === "object") { - option = rawData; - rawData = false; - } - - var data = $.map(metrics, function (metric) { - return rawData ? metric.value[0] : { - x: metric.timestamp, - y: metric.value[0] - }; - }); - return $.extend({ - name: name, - showSymbol: false, - type: "line", - data: data - }, option || {}); - }; - - METRIC.get = function (url, params) { - return $http({ - url: url, - method: "GET", - params: params - }); - }; - - METRIC.condition = function (condition) { - return $.map(condition, function (value, key) { - return "@" + key + '="' + value + '"'; - }).join(" AND "); - }; - - - METRIC.hbaseMetrics = function (condition, metric, startTime, endTime, limit) { - var config = { - condition: METRIC.condition(condition), - startTime: Time.format(startTime), - endTime: Time.format(endTime), - metric: metric, - limit: limit || 10000 - }; - - var metrics_url = common.template(getQuery("HBASE_METRICS_WITHTIME"), config); - return wrapList(METRIC.get(metrics_url)); - }; - - METRIC.hbaseMomentMetric = function (condition, metric, limit) { - var config = { - condition: METRIC.condition(condition), - metric: metric, - limit: limit || 10000 - }; - - var metrics_url = common.template(getQuery("HBASE_METRICS"), config); - return METRIC.get(metrics_url); - }; - - METRIC.aggHBaseInstance = function (condition, groups, field, limit) { - var fields = field.split(/\s*,\s*/); - var fieldStr = $.map(fields, function (field, index) { - var matches = field.match(/^([^\s]*)(\s+.*)?$/); - if (matches[2]) { - orderId = index; - } - return matches[1]; - }).join(", "); - var config = { - condition: METRIC.condition(condition), - groups: toFields(groups), - field: fieldStr, - limit: limit || 10000 - }; - var metrics_url = common.template(getQuery("HBASE_INSTANCE_AGG"), config); - return wrapList(METRIC.get(metrics_url)); - }; - - METRIC.hbaseMetricsAggregation = function (condition, metric, groups, field, intervalMin, startTime, endTime, top, limit) { - var fields = field.split(/\s*,\s*/); - var orderId = -1; - var fieldStr = $.map(fields, function (field, index) { - var matches = field.match(/^([^\s]*)(\s+.*)?$/); - if (matches[2]) { - orderId = index; - } - return matches[1]; - }).join(", "); - - - var config = { - condition: METRIC.condition(condition), - startTime: Time.format(startTime), - endTime: Time.format(endTime), - metric: metric, - groups: toFields(groups), - field: fieldStr, - order: orderId === -1 ? "" : ".{" + fields[orderId] + "}", - top: top ? "&top=" + top : "", - intervalMin: intervalMin, - limit: limit || 10000 - }; - - var metrics_url = common.template(getQuery("HBASE_METRICS_INTERVAL"), config); - var _list = wrapList(METRIC.get(metrics_url)); - _list._aggInfo = { - groups: groups, - startTime: Time(startTime).valueOf(), - interval: intervalMin * 60 * 1000 - }; - _list._promise.then(function () { - _list.reverse(); - }); - return _list; - }; - - METRIC.aggMetricsToEntities = function (list, param, flatten) { - var _list = []; - _list.done = false; - _list._promise = list._promise.then(function () { - var _startTime = list._aggInfo.startTime; - var _interval = list._aggInfo.interval; - - $.each(list, function (i, obj) { - var tags = {}; - $.each(list._aggInfo.groups, function (j, group) { - tags[group] = obj.key[j]; - }); - - var _subList = $.map(obj.value[0], function (value, index) { - return { - timestamp: _startTime + index * _interval, - value: [value], - tags: tags, - flag: param - }; - }); - - if (flatten) { - _list.push.apply(_list, _subList); - } else { - _list.push(_subList); - } - }); - _list.done = true; - return _list; - }); - return _list; - }; - - - METRIC.hbasehostStatus = function (condition, limit) { - var config = { - condition: METRIC.condition(condition), - limit: limit || 10000 - }; - - var metrics_url = common.template(getQuery("HBASE_INSTANCE"), config); - return wrapList(METRIC.get(metrics_url)); - }; - - METRIC.hbaseMaster = function (siteId, status, limit) { - var condition = { - site: siteId, - role: "hmaster", - status: status - }; - return METRIC.hbasehostStatus(condition, limit); - }; - - METRIC.regionserverStatus = function (hostname, siteid) { - var hoststateinfo; - var condition = { - site: siteid, - role: "regionserver", - hostname: hostname - }; - hoststateinfo = METRIC.hbasehostStatus(condition, 1); - return hoststateinfo; - }; - - METRIC.regionserverList = function (siteid) { - var hoststateinfos; - var condition = { - site: siteid, - role: "regionserver" - }; - hoststateinfos = METRIC.hbasehostStatus(condition); - return hoststateinfos; - }; - - METRIC.getMetricObj = function () { - var deferred = $q.defer(); - $http.get("apps/hadoop_metric/config.json").success(function (resp) { - deferred.resolve(resp); - }); - return deferred.promise; - }; - return METRIC; - }); - - hadoopMetricApp.requireCSS("style/index.css"); - hadoopMetricApp.require("widgets/availabilityChart.js"); - hadoopMetricApp.require("ctrls/overview.js"); - hadoopMetricApp.require("ctrls/hdfs.js"); - hadoopMetricApp.require("ctrls/regionDetailCtrl.js"); - hadoopMetricApp.require("ctrls/regionListCtrl.js"); - hadoopMetricApp.require("ctrls/backupMasterListCtrl.js"); -})(); http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/backupMasterList.html ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/backupMasterList.html b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/backupMasterList.html deleted file mode 100644 index 13e20c9..0000000 --- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/backupMasterList.html +++ /dev/null @@ -1,52 +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="!backupMasterList._done || isSorting" class="fa fa-refresh fa-spin no-animate"></span> - </h3> - </div> - <div class="box-body"> - <div id="backupMasterList" sort-table="backupMasterList" is-sorting="isSorting" - search-path-list="searchPathList" - scope="tableScope"> - <table class="table table-bordered"> - <thead> - <tr> - <th sortpath="tags.hostname">Master</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 backupMasterList"> - <td> - <a ui-sref="masterDetail({siteId: site, hostname: item.tags.hostname})">{{item.tags.hostname}}</a> - </td> - <td>{{item.tags.rack}}</td> - <td>{{item.tags.site}}</td> - <td> - <span>{{item.status}}</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/partials/hdfs/index.html ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/hdfs/index.html b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/hdfs/index.html deleted file mode 100644 index 33acb15..0000000 --- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/hdfs/index.html +++ /dev/null @@ -1,19 +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. - --> - -HDFS Page http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/overview.html ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/overview.html b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/overview.html deleted file mode 100644 index 86a1591..0000000 --- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/overview.html +++ /dev/null @@ -1,111 +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"> - <span class="fa fa-television"></span> - <h3 class="box-title"> - HBase Service Summary Information - </h3> - </div> - <div class="box-body"> - <table class="table table-striped hadoopMetric-table"> - <tr> - <td width="5%"> - <span ng-show="hmasteractivenum">{{hmasteractivenum}}</span> - <span ng-show="!hmasteractivenum" class="fa fa fa-refresh fa-spin no-animate"></span> - </td> - <th width="45%">Active HBase Master</th> - <td width="5%"> - <span ng-show="regionsnum">{{regionsnum}}</span> - <span ng-show="!regionsnum" class="fa fa fa-refresh fa-spin no-animate"></span> - </td> - <th width="45%">Regions - </th> - </tr> - <tr> - <td> - <a ui-sref="backupMasterList({siteId: site})"> - <span ng-show="hmasterstandbynum">{{hmasterstandbynum}}</span></a> - <span ng-show="!hmasterstandbynum">0</span> - </td> - <th>Backup HBase Master</th> - <td> - <span ng-show="hmasteraverageload !== '-1'">{{common.number.format(hmasteraverageload, 0)}}</span> - <span ng-show="hmasteraverageload === '-1'" class="fa fa-refresh fa-spin no-animate"></span> - </td> - <th>Average Load</th> - </tr> - <tr> - <td> - <a ui-sref="regionList({siteId: site})"> - <span ng-show="regionserverhealtynum || regionserverunhealtynum">{{regionserverhealtynum+regionserverunhealtynum}}</span></a> - <span ng-show="!regionserverhealtynum && !regionserverunhealtynum">0</span> - </td> - <th>RegionServers: - <a ui-sref="regionList({siteId: site})"> - <span ng-show="regionserverhealtynum">{{regionserverhealtynum}}</span></a> - <span ng-show="!regionserverhealtynum">0</span> - <span - class="label label-success">Good Health</span> / - <a ui-sref="regionList({siteId: site})"> - <span ng-show="regionserverunhealtynum">{{regionserverunhealtynum}}</span></a> - <span ng-show="!regionserverunhealtynum">0</span> - <span class="label label-danger">Bad Health</span> - </th> - <td></td> - <th></th> - </tr> - </table> - </div> -</div> - -<div class="box box-primary"> - <div class="box-header with-border"> - <span class="fa fa-line-chart"></span> - <h3 class="box-title"> - Metrics - <span>({{defaultHostname}})</span> - </h3> - </div> - <div class="box-body no-padding"> - <div class="row border-split"> - <div class="col-sm-6 col-md-4 col-lg-6" ng-repeat="chart in chartList track by $index"> - <div class="hadoopMetric-chart"> - <h3>{{metricList[chart.name].title}}</h3> - <div ng-show="metricList[chart.name].loading" chart class="hadoopMetric-chart-container"></div> - <div ng-show="metricList[chart.name].loading" class="overlay-wrapper"> - <div class="overlay"> - <i class="fa fa-refresh fa-spin"></i> - </div> - </div> - <div ng-show="metricList[chart.name].series.length" chart class="hadoopMetric-chart-container" - series="metricList[chart.name].series" - option="metricList[chart.name].option"></div> - <div ng-show="!metricList[chart.name].series.length && !metricList[chart.name].loading" class="hadoopMetric-chart-container"> - <div class="hadoopMetric-chart-container-withborder"> - <div class="hadoopMetric-no-chart-data"> - <span class="fa fa-question-circle"></span><span> NO DATA</span> - </div> - </div> - </div> - </div> - </div> - </div> - </div> -</div> http://git-wip-us.apache.org/repos/asf/eagle/blob/c32b7152/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/region/regionDetail.html ---------------------------------------------------------------------- diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/region/regionDetail.html b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/region/regionDetail.html deleted file mode 100644 index 63a895f..0000000 --- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/region/regionDetail.html +++ /dev/null @@ -1,117 +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"> - <span class="fa fa-television"></span> - <h3 class="box-title"> - Summary - </h3> - </div> - <div class="box-body"> - <table class="table table-striped"> - <tbody ng-if="(regionstatus || []).length !== 0"> - <tr> - <th>Status</th> - <td class="text-break"> - <span ng-if="regionstatus[0].status==='live'" class="label label-success">Healthy</span> - <span ng-if="regionstatus[0].status!=='live'" class="label label-danger">UnHealthy</span> - </td> - </tr> - <tr> - <th>Rack</th> - <td class="text-break">{{regionstatus[0].tags.rack}}</td> - </tr> - <tr> - <th>MaxHeap</th> - <td class="text-break">{{regionstatus[0].maxHeapMB}} MB</td> - </tr> - <tr> - <th>UsedHeap</th> - <td class="text-break">{{regionstatus[0].usedHeapMB}} MB</td> - </tr> - <tr> - <th>NumRegions</th> - <td class="text-break">{{regionstatus[0].numRegions}}</td> - </tr> - <tr> - <th>NumRequests</th> - <td class="text-break">{{regionstatus[0].numRequests}}</td> - </tr> - </tbody> - <tbody ng-if="regionstatus.length === 0"> - <tr> - <th>Status</th> - <td class="text-break"><span class="label label-danger">Unknow</span></td> - </tr> - <tr> - <th>Rack</th> - <td class="text-break"><span class="label label-danger">Unknow</span></td> - </tr> - <tr> - <th>MaxHeap</th> - <td class="text-break"><span class="label label-danger">Unknow</span></td> - </tr> - <tr> - <th>UsedHeap</th> - <td class="text-break"><span class="label label-danger">Unknow</span></td> - </tr> - <tr> - <th>NumRegions</th> - <td class="text-break"><span class="label label-danger">Unknow</span></td> - </tr> - <tr> - <th>NumRequests</th> - <td class="text-break"><span class="label label-danger">Unknow</span></td> - </tr> - </tbody> - </table> - </div> -</div> - -<div class="box box-primary"> - <div class="box-header with-border"> - <span class="fa fa-line-chart"></span> - <h3 class="box-title"> - Metrics - </h3> - </div> - <div class="box-body no-padding"> - <div class="row border-split"> - <div class="col-sm-6 hadoopMetric-col-md-6 col-lg-6" ng-repeat="chart in chartList track by $index"> - <div class="hadoopMetric-chart"> - <h3>{{metricList[chart.name].title}}</h3> - <div ng-show="metricList[chart.name].loading" class="hadoopMetric-chart-container"></div> - <div ng-show="metricList[chart.name].loading" class="overlay-wrapper"> - <div class="overlay"> - <i class="fa fa-refresh fa-spin"></i> - </div> - </div> - <div ng-show="metricList[chart.name].series.length" chart class="hadoopMetric-chart-container" - series="metricList[chart.name].series" - option="metricList[chart.name].option"></div> - <div ng-show="!metricList[chart.name].series.length && !metricList[chart.name].loading" class="hadoopMetric-chart-container"> - <div class="hadoopMetric-no-chart-data"> - <span class="fa fa-question-circle"></span><span> NO DATA</span> - </div> - </div> - </div> - </div> - </div> - </div> -</div>
