You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by bi...@apache.org on 2015/01/05 22:39:31 UTC
incubator-slider git commit: SLIDER-147 configure ganglia metrics for
accumulo app package
Repository: incubator-slider
Updated Branches:
refs/heads/develop 07a552630 -> 566b3f66f
SLIDER-147 configure ganglia metrics for accumulo app package
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/566b3f66
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/566b3f66
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/566b3f66
Branch: refs/heads/develop
Commit: 566b3f66ff92ef2d8b72a36833234efcefdd1fbd
Parents: 07a5526
Author: Billie Rinaldi <bi...@gmail.com>
Authored: Mon Jan 5 13:38:41 2015 -0800
Committer: Billie Rinaldi <bi...@gmail.com>
Committed: Mon Jan 5 13:38:41 2015 -0800
----------------------------------------------------------------------
app-packages/accumulo/appConfig-default.json | 7 +++++
.../accumulo/appConfig-secured-default.json | 9 +++++++
.../accumulo/configuration/metrics2.xml | 28 ++++++++++++++++++++
app-packages/accumulo/metainfo.xml | 15 ++++++++++-
.../package/scripts/accumulo_configuration.py | 7 +++++
5 files changed, 65 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/566b3f66/app-packages/accumulo/appConfig-default.json
----------------------------------------------------------------------
diff --git a/app-packages/accumulo/appConfig-default.json b/app-packages/accumulo/appConfig-default.json
index 968abcf..6e3f1fc 100644
--- a/app-packages/accumulo/appConfig-default.json
+++ b/app-packages/accumulo/appConfig-default.json
@@ -9,6 +9,9 @@
"site.global.app_root": "${AGENT_WORK_ROOT}/app/install/accumulo-${accumulo.version}",
"site.global.app_user": "${app.user}",
"site.global.user_group": "${app.user.group}",
+ "site.global.ganglia_server_host": "${NN_HOST}",
+ "site.global.ganglia_server_port": "8669",
+ "site.global.ganglia_server_id": "Application3",
"site.accumulo-env.java_home": "${JAVA_HOME}",
"site.accumulo-env.tserver_heapsize": "256m",
@@ -24,6 +27,10 @@
"site.proxy.port": "${ACCUMULO_PROXY.ALLOCATED_PORT}{PER_CONTAINER}",
+ "site.metrics2.accumulo.sink.ganglia.class": "org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31",
+ "site.metrics2.accumulo.sink.ganglia.period": "10",
+ "site.metrics2.accumulo.sink.ganglia.servers": "${@//site/global/ganglia_server_host}:${@//site/global/ganglia_server_port}",
+
"site.global.accumulo_root_password": "NOT_USED",
"site.global.ssl_cert_dir": "ssl",
"site.global.monitor_protocol": "http",
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/566b3f66/app-packages/accumulo/appConfig-secured-default.json
----------------------------------------------------------------------
diff --git a/app-packages/accumulo/appConfig-secured-default.json b/app-packages/accumulo/appConfig-secured-default.json
index b493ccc..358df65 100644
--- a/app-packages/accumulo/appConfig-secured-default.json
+++ b/app-packages/accumulo/appConfig-secured-default.json
@@ -9,6 +9,9 @@
"site.global.app_root": "${AGENT_WORK_ROOT}/app/install/accumulo-${accumulo.version}",
"site.global.app_user": "${USER}",
"site.global.user_group": "${USER}",
+ "site.global.ganglia_server_host": "${NN_HOST}",
+ "site.global.ganglia_server_port": "8669",
+ "site.global.ganglia_server_id": "Application3",
"site.accumulo-env.java_home": "${JAVA_HOME}",
"site.accumulo-env.tserver_heapsize": "256m",
@@ -22,6 +25,12 @@
"site.client.instance.name": "${USER}-${CLUSTER_NAME}",
+ "site.proxy.port": "${ACCUMULO_PROXY.ALLOCATED_PORT}{PER_CONTAINER}",
+
+ "site.metrics2.accumulo.sink.ganglia.class": "org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31",
+ "site.metrics2.accumulo.sink.ganglia.period": "10",
+ "site.metrics2.accumulo.sink.ganglia.servers": "${@//site/global/ganglia_server_host}:${@//site/global/ganglia_server_port}",
+
"site.global.accumulo_root_password": "NOT_USED",
"site.global.ssl_cert_dir": "ssl",
"site.global.monitor_protocol": "http",
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/566b3f66/app-packages/accumulo/configuration/metrics2.xml
----------------------------------------------------------------------
diff --git a/app-packages/accumulo/configuration/metrics2.xml b/app-packages/accumulo/configuration/metrics2.xml
new file mode 100644
index 0000000..ad3ab73
--- /dev/null
+++ b/app-packages/accumulo/configuration/metrics2.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * 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.
+ */
+-->
+
+<configuration>
+ <property>
+ <name>*.period</name>
+ <value>60</value>
+ </property>
+</configuration>
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/566b3f66/app-packages/accumulo/metainfo.xml
----------------------------------------------------------------------
diff --git a/app-packages/accumulo/metainfo.xml b/app-packages/accumulo/metainfo.xml
index 4cfaa6b..0bf374e 100644
--- a/app-packages/accumulo/metainfo.xml
+++ b/app-packages/accumulo/metainfo.xml
@@ -45,6 +45,14 @@
${site.global.monitor_protocol}://${ACCUMULO_MONITOR_HOST}:${site.accumulo-site.monitor.port.client}/xml
</value>
</export>
+ <export>
+ <name>org.apache.slider.metrics</name>
+ <value>http://${site.global.ganglia_server_host}/cgi-bin/rrd.py?c=${site.global.ganglia_server_id}</value>
+ </export>
+ <export>
+ <name>org.apache.slider.metrics.ui</name>
+ <value>http://${site.global.ganglia_server_host}/ganglia?c=${site.global.ganglia_server_id}</value>
+ </export>
</exports>
</exportGroup>
</exportGroups>
@@ -97,7 +105,7 @@
<name>ACCUMULO_MONITOR</name>
<category>MASTER</category>
<publishConfig>true</publishConfig>
- <appExports>QuickLinks-org.apache.slider.jmx,QuickLinks-org.apache.slider.monitor</appExports>
+ <appExports>QuickLinks-org.apache.slider.jmx,QuickLinks-org.apache.slider.monitor,QuickLinks-org.apache.slider.metrics,QuickLinks-org.apache.slider.metrics.ui</appExports>
<commandScript>
<script>scripts/accumulo_monitor.py</script>
<scriptType>PYTHON</scriptType>
@@ -192,6 +200,11 @@
<fileName>proxy.properties</fileName>
<dictionaryName>proxy</dictionaryName>
</configFile>
+ <configFile>
+ <type>properties</type>
+ <fileName>hadoop-metrics2-accumulo.properties</fileName>
+ <dictionaryName>metrics2</dictionaryName>
+ </configFile>
</configFiles>
</application>
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/566b3f66/app-packages/accumulo/package/scripts/accumulo_configuration.py
----------------------------------------------------------------------
diff --git a/app-packages/accumulo/package/scripts/accumulo_configuration.py b/app-packages/accumulo/package/scripts/accumulo_configuration.py
index 2440250..f5cb7fe 100644
--- a/app-packages/accumulo/package/scripts/accumulo_configuration.py
+++ b/app-packages/accumulo/package/scripts/accumulo_configuration.py
@@ -133,6 +133,13 @@ def setup_conf_dir(name=None): # 'master' or 'tserver' or 'monitor' or 'gc' or '
group = params.user_group
)
+ # create metrics2 properties file
+ PropertiesFile(format("{params.conf_dir}/hadoop-metrics2-accumulo.properties"),
+ properties = params.config['configurations']['metrics2'],
+ owner = params.accumulo_user,
+ group = params.user_group
+ )
+
if name == "proxy":
# create proxy.properties file
PropertiesFile(params.proxy_conf,