You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mw...@apache.org on 2017/03/02 17:45:53 UTC

[1/2] accumulo git commit: ACCUMULO-4593 Move metrics config to templates dir

Repository: accumulo
Updated Branches:
  refs/heads/master 1026e857e -> a1250211c


ACCUMULO-4593 Move metrics config to templates dir

* Updated documentation to reflect changes
* Legacy metrics now look for configuration file on classpath rather
  than using ACCUMULO_CONF_DIR env variable


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/192b4e81
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/192b4e81
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/192b4e81

Branch: refs/heads/master
Commit: 192b4e81a7a93eb85e35adb4e10cd9631781583d
Parents: 6124529
Author: Mike Walch <mw...@apache.org>
Authored: Tue Feb 28 16:18:24 2017 -0500
Committer: Mike Walch <mw...@apache.org>
Committed: Thu Mar 2 12:42:25 2017 -0500

----------------------------------------------------------------------
 INSTALL.md                                      |  2 +-
 assemble/bin/accumulo-util                      |  2 +-
 assemble/conf/accumulo-metrics.xml              | 60 --------------
 .../conf/hadoop-metrics2-accumulo.properties    | 86 --------------------
 assemble/conf/templates/accumulo-metrics.xml    | 60 ++++++++++++++
 .../hadoop-metrics2-accumulo.properties         | 86 ++++++++++++++++++++
 .../main/asciidoc/chapters/administration.txt   | 38 +++++----
 .../server/metrics/MetricsConfiguration.java    | 67 +++++++--------
 8 files changed, 198 insertions(+), 203 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/192b4e81/INSTALL.md
----------------------------------------------------------------------
diff --git a/INSTALL.md b/INSTALL.md
index f3d5873..c7f06db 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -46,7 +46,7 @@ with the following command.
 
 If the command fails, its OK to continue with setup and resolve the issue later.
 
-Accumulo is configured by the files +accumulo-site.xml+ and +accumulo-env.sh+ in the `conf/`
+Accumulo is configured by the files `accumulo-site.xml` and `accumulo-env.sh` in the `conf/`
 directory. You can either edit these files for your environment or run the command below which will
 overwrite them with files configured for your environment.
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/192b4e81/assemble/bin/accumulo-util
----------------------------------------------------------------------
diff --git a/assemble/bin/accumulo-util b/assemble/bin/accumulo-util
index 25dc907..267ccb6 100755
--- a/assemble/bin/accumulo-util
+++ b/assemble/bin/accumulo-util
@@ -298,7 +298,7 @@ function create_config() {
     MAVEN_PROJ_BASEDIR="\n  <property>\n    <name>general.maven.project.basedir</name>\n    <value>${BASE_DIR}</value>\n  </property>\n"
   fi
 
-  mkdir -p "${CONF_DIR}" && cp "${TEMPLATE_CONF_DIR}"/* "${CONF_DIR}"/
+  mkdir -p "${CONF_DIR}" && cp "${TEMPLATE_CONF_DIR}"/{$ACCUMULO_SITE,$ACCUMULO_ENV} "${CONF_DIR}"/
 
   #Configure accumulo-env.sh
   sed -e "s/\${tServerHigh_tServerLow}/${!TSERVER}/" \

http://git-wip-us.apache.org/repos/asf/accumulo/blob/192b4e81/assemble/conf/accumulo-metrics.xml
----------------------------------------------------------------------
diff --git a/assemble/conf/accumulo-metrics.xml b/assemble/conf/accumulo-metrics.xml
deleted file mode 100644
index 24228eb..0000000
--- a/assemble/conf/accumulo-metrics.xml
+++ /dev/null
@@ -1,60 +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.
--->
-<!--
-  This file follows the conventions for XMLConfiguration files specified in the Apache Commons Configuration 1.5 Library. Changes to this file will be noticed
-  at runtime (see the FileChangedReloadingStrategy class in Commons Configuration).
--->
-<config>
-<!--
-   Metrics log directory
--->
-  <logging>
-    <dir>${ACCUMULO_LOG_DIR}/metrics</dir>
-  </logging>
-<!--
- Enable/Disable metrics accumulation on the different servers and their components
- NOTE: Turning on logging can be expensive because it will use several more file handles and will create a lot of short lived objects.
--->
-  <master>
-    <enabled type="boolean">false</enabled>
-    <logging type="boolean">false</logging>
-  </master>
-  <tserver>
-    <enabled type="boolean">false</enabled>
-    <logging type="boolean">false</logging>
-    <update>
-      <enabled type="boolean">false</enabled>
-      <logging type="boolean">false</logging>
-    </update>
-    <scan>
-      <enabled type="boolean">false</enabled>
-      <logging type="boolean">false</logging>
-    </scan>
-    <minc>
-      <enabled type="boolean">false</enabled>
-      <logging type="boolean">false</logging>
-    </minc>
-  </tserver>
-  <thrift>
-    <enabled type="boolean">false</enabled>
-    <logging type="boolean">false</logging>
-  </thrift>
-  <replication>
-    <enabled type="boolean">false</enabled>
-    <logging type="boolean">false</logging>
-  </replication>
-</config>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/192b4e81/assemble/conf/hadoop-metrics2-accumulo.properties
----------------------------------------------------------------------
diff --git a/assemble/conf/hadoop-metrics2-accumulo.properties b/assemble/conf/hadoop-metrics2-accumulo.properties
deleted file mode 100644
index 7e3c7c0..0000000
--- a/assemble/conf/hadoop-metrics2-accumulo.properties
+++ /dev/null
@@ -1,86 +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.
-
-# Poll collectors every ten seconds
-*.period=10
-
-#
-# MetricSink configuration
-# 
-# Uncomment a sink (and configuration) to enable it. By default,
-# no sinks are enabled.
-#
-
-#
-# Configure file logging
-#
-
-# File sink for all metrics
-# accumulo.sink.file-all.class=org.apache.hadoop.metrics2.sink.FileSink
-# accumulo.sink.file-all.filename=all.metrics
-
-# File sink for tserver metrics
-# accumulo.sink.file-tserver.class=org.apache.hadoop.metrics2.sink.FileSink
-# accumulo.sink.file-tserver.context=tserver
-# accumulo.sink.file-tserver.filename=tserver.metrics
-
-# File sink for master metrics
-# accumulo.sink.file-master.class=org.apache.hadoop.metrics2.sink.FileSink
-# accumulo.sink.file-master.context=master
-# accumulo.sink.file-master.filename=master.metrics
-
-# File sink for thrift server metrics
-# accumulo.sink.file-thrift.class=org.apache.hadoop.metrics2.sink.FileSink
-# accumulo.sink.file-thrift.context=thrift
-# accumulo.sink.file-thrift.filename=thrift.metrics
-
-#
-# Configure Graphite
-#
-
-# Configure all sources to be written to a Graphite instance
-# accumulo.sink.graphite.class=org.apache.hadoop.metrics2.sink.GraphiteSink
-# accumulo.sink.graphite.server_host=localhost
-# accumulo.sink.graphite.server_port=2003
-
-#
-# Configure Ganglia
-#
-
-# for Ganglia 3.0 support
-# accumulo.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink30
-
-# for Ganglia 3.1 support
-# accumulo.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31
-
-# accumulo.sink.ganglia.period=10
-
-# default for supportsparse is false
-# accumulo.sink.ganglia.supportsparse=true
-
-# accumulo.sink.ganglia.slope=jvm.metrics.gcCount=zero,jvm.metrics.memHeapUsedM=both
-# accumulo.sink.ganglia.dmax=jvm.metrics.threadsBlocked=70,jvm.metrics.memHeapUsedM=40
-
-# Tag values to use for the ganglia prefix. If not defined no tags are used.
-# If '*' all tags are used. If specifiying multiple tags separate them with
-# commas. Note that the last segment of the property name is the context name.
-#
-# accumulo.sink.ganglia.tagsForPrefix.jvm=ProcesName
-# accumulo.sink.ganglia.tagsForPrefix.tserver=
-# accumulo.sink.ganglia.tagsForPrefix.master=
-# accumulo.sink.ganglia.tagsForPrefix.thrift=
-
-# Ganglia host(s)
-# accumulo.sink.ganglia.servers=yourgangliahost_1:8649,yourgangliahost_2:8649

http://git-wip-us.apache.org/repos/asf/accumulo/blob/192b4e81/assemble/conf/templates/accumulo-metrics.xml
----------------------------------------------------------------------
diff --git a/assemble/conf/templates/accumulo-metrics.xml b/assemble/conf/templates/accumulo-metrics.xml
new file mode 100644
index 0000000..24228eb
--- /dev/null
+++ b/assemble/conf/templates/accumulo-metrics.xml
@@ -0,0 +1,60 @@
+<!--
+  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.
+-->
+<!--
+  This file follows the conventions for XMLConfiguration files specified in the Apache Commons Configuration 1.5 Library. Changes to this file will be noticed
+  at runtime (see the FileChangedReloadingStrategy class in Commons Configuration).
+-->
+<config>
+<!--
+   Metrics log directory
+-->
+  <logging>
+    <dir>${ACCUMULO_LOG_DIR}/metrics</dir>
+  </logging>
+<!--
+ Enable/Disable metrics accumulation on the different servers and their components
+ NOTE: Turning on logging can be expensive because it will use several more file handles and will create a lot of short lived objects.
+-->
+  <master>
+    <enabled type="boolean">false</enabled>
+    <logging type="boolean">false</logging>
+  </master>
+  <tserver>
+    <enabled type="boolean">false</enabled>
+    <logging type="boolean">false</logging>
+    <update>
+      <enabled type="boolean">false</enabled>
+      <logging type="boolean">false</logging>
+    </update>
+    <scan>
+      <enabled type="boolean">false</enabled>
+      <logging type="boolean">false</logging>
+    </scan>
+    <minc>
+      <enabled type="boolean">false</enabled>
+      <logging type="boolean">false</logging>
+    </minc>
+  </tserver>
+  <thrift>
+    <enabled type="boolean">false</enabled>
+    <logging type="boolean">false</logging>
+  </thrift>
+  <replication>
+    <enabled type="boolean">false</enabled>
+    <logging type="boolean">false</logging>
+  </replication>
+</config>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/192b4e81/assemble/conf/templates/hadoop-metrics2-accumulo.properties
----------------------------------------------------------------------
diff --git a/assemble/conf/templates/hadoop-metrics2-accumulo.properties b/assemble/conf/templates/hadoop-metrics2-accumulo.properties
new file mode 100644
index 0000000..7e3c7c0
--- /dev/null
+++ b/assemble/conf/templates/hadoop-metrics2-accumulo.properties
@@ -0,0 +1,86 @@
+# 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.
+
+# Poll collectors every ten seconds
+*.period=10
+
+#
+# MetricSink configuration
+# 
+# Uncomment a sink (and configuration) to enable it. By default,
+# no sinks are enabled.
+#
+
+#
+# Configure file logging
+#
+
+# File sink for all metrics
+# accumulo.sink.file-all.class=org.apache.hadoop.metrics2.sink.FileSink
+# accumulo.sink.file-all.filename=all.metrics
+
+# File sink for tserver metrics
+# accumulo.sink.file-tserver.class=org.apache.hadoop.metrics2.sink.FileSink
+# accumulo.sink.file-tserver.context=tserver
+# accumulo.sink.file-tserver.filename=tserver.metrics
+
+# File sink for master metrics
+# accumulo.sink.file-master.class=org.apache.hadoop.metrics2.sink.FileSink
+# accumulo.sink.file-master.context=master
+# accumulo.sink.file-master.filename=master.metrics
+
+# File sink for thrift server metrics
+# accumulo.sink.file-thrift.class=org.apache.hadoop.metrics2.sink.FileSink
+# accumulo.sink.file-thrift.context=thrift
+# accumulo.sink.file-thrift.filename=thrift.metrics
+
+#
+# Configure Graphite
+#
+
+# Configure all sources to be written to a Graphite instance
+# accumulo.sink.graphite.class=org.apache.hadoop.metrics2.sink.GraphiteSink
+# accumulo.sink.graphite.server_host=localhost
+# accumulo.sink.graphite.server_port=2003
+
+#
+# Configure Ganglia
+#
+
+# for Ganglia 3.0 support
+# accumulo.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink30
+
+# for Ganglia 3.1 support
+# accumulo.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31
+
+# accumulo.sink.ganglia.period=10
+
+# default for supportsparse is false
+# accumulo.sink.ganglia.supportsparse=true
+
+# accumulo.sink.ganglia.slope=jvm.metrics.gcCount=zero,jvm.metrics.memHeapUsedM=both
+# accumulo.sink.ganglia.dmax=jvm.metrics.threadsBlocked=70,jvm.metrics.memHeapUsedM=40
+
+# Tag values to use for the ganglia prefix. If not defined no tags are used.
+# If '*' all tags are used. If specifiying multiple tags separate them with
+# commas. Note that the last segment of the property name is the context name.
+#
+# accumulo.sink.ganglia.tagsForPrefix.jvm=ProcesName
+# accumulo.sink.ganglia.tagsForPrefix.tserver=
+# accumulo.sink.ganglia.tagsForPrefix.master=
+# accumulo.sink.ganglia.tagsForPrefix.thrift=
+
+# Ganglia host(s)
+# accumulo.sink.ganglia.servers=yourgangliahost_1:8649,yourgangliahost_2:8649

http://git-wip-us.apache.org/repos/asf/accumulo/blob/192b4e81/docs/src/main/asciidoc/chapters/administration.txt
----------------------------------------------------------------------
diff --git a/docs/src/main/asciidoc/chapters/administration.txt b/docs/src/main/asciidoc/chapters/administration.txt
index 69ae1a8..cd70937 100644
--- a/docs/src/main/asciidoc/chapters/administration.txt
+++ b/docs/src/main/asciidoc/chapters/administration.txt
@@ -566,22 +566,28 @@ An Accumulo user name and password must be entered for access to the shell.
 
 === Metrics
 
-Accumulo is capable of using the Hadoop Metrics2 library and is configured by default to use it. Metrics2 is a library
-which allows for routing of metrics generated by registered MetricsSources to configured MetricsSinks. Examples of sinks
-that are implemented by Hadoop include file-based logging, Graphite and Ganglia. All metric sources are exposed via JMX
-when using Metrics2.
-
-Previous to Accumulo 1.7.0, JMX endpoints could be exposed in addition to file-based logging of those metrics configured via
-the +accumulo-metrics.xml+ file. This mechanism can still be used by setting +general.legacy.metrics+ to +true+ in +accumulo-site.xml+.
-
-==== Metrics2 Configuration
-
-Metrics2 is configured by examining the classpath for a file that matches +hadoop-metrics2*.properties+. The example configuration
-files that Accumulo provides for use include +hadoop-metrics2-accumulo.properties+ as a template which can be used to enable 
-file, Graphite or Ganglia sinks (some minimal configuration required for Graphite and Ganglia). Because the Hadoop configuration is
-also on the Accumulo classpath, be sure that you do not have multiple Metrics2 configuration files. It is recommended to consolidate
-metrics in a single properties file in a central location to remove ambiguity. The contents of +hadoop-metrics2-accumulo.properties+
-can be added to a central +hadoop-metrics2.properties+ in +$HADOOP_CONF_DIR+.
+Accumulo can expose metrics through a legacy metrics library and using the Hadoop Metrics2 library.
+
+==== Legacy Metrics
+
+Accumulo has a legacy metrics library that can be exposes metrics using JMX endpoints or file-based logging. These metrics can
+be enabled by setting +general.legacy.metrics+ to +true+ in +accumulo-site.xml+ and placing the +accumulo-metrics.xml+
+configuration file on the classpath (which is typically done by placing the file in the +conf/+ directory). A template for
++accumulo-metrics.xml+ can be found in +conf/templates+ of the Accumulo tarball.
+
+==== Hadoop Metrics2
+
+Hadoop Metrics2 is a library which allows for routing of metrics generated by registered MetricsSources to
+configured MetricsSinks. Examples of sinks that are implemented by Hadoop include file-based logging, Graphite and Ganglia.
+All metric sources are exposed via JMX when using Metrics2.
+
+Metrics2 is configured by examining the classpath for a file that matches +hadoop-metrics2*.properties+. The Accumulo tarball 
+contains an example +hadoop-metrics2-accumulo.properties+ file in +conf/templates+ which can be copied to +conf/+ to place
+on classpath. This file is used to enable file, Graphite or Ganglia sinks (some minimal configuration required for Graphite
+and Ganglia). Because the Hadoop configuration is also on the Accumulo classpath, be sure that you do not have multiple
+Metrics2 configuration files. It is recommended to consolidate metrics in a single properties file in a central location to
+remove ambiguity. The contents of +hadoop-metrics2-accumulo.properties+ can be added to a central +hadoop-metrics2.properties+
+in +$HADOOP_CONF_DIR+.
 
 As a note for configuring the file sink, the provided path should be absolute. A relative path or file name will be created relative
 to the directory in which the Accumulo process was started. External tools, such as logrotate, can be used to prevent these files

http://git-wip-us.apache.org/repos/asf/accumulo/blob/192b4e81/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java b/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
index 796d197..2a6fcd4 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
@@ -16,7 +16,7 @@
  */
 package org.apache.accumulo.server.metrics;
 
-import java.io.File;
+import java.net.URL;
 
 import org.apache.accumulo.core.util.Daemon;
 import org.apache.commons.configuration.AbstractFileConfiguration;
@@ -28,12 +28,12 @@ import org.apache.commons.configuration.XMLConfiguration;
 import org.apache.commons.configuration.event.ConfigurationEvent;
 import org.apache.commons.configuration.event.ConfigurationListener;
 import org.apache.commons.configuration.reloading.FileChangedReloadingStrategy;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class MetricsConfiguration {
 
-  private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(MetricsConfiguration.class);
-
-  private static final String metricsFileName = "accumulo-metrics.xml";
+  private static final Logger log = LoggerFactory.getLogger(MetricsConfiguration.class);
 
   private static boolean alreadyWarned = false;
 
@@ -148,46 +148,35 @@ public class MetricsConfiguration {
   }
 
   private void loadConfiguration() {
-    String accumuloConfDir = getEnvironmentConfiguration().getString("ACCUMULO_CONF_DIR");
-    if (null != accumuloConfDir) {
-      // Try to load the metrics properties file
-      File mFile = new File(accumuloConfDir, metricsFileName);
-      if (mFile.exists()) {
-        if (log.isDebugEnabled())
-          log.debug("Loading config file: " + mFile.getAbsolutePath());
-        try {
-          xConfig = new XMLConfiguration(mFile);
-          xConfig.append(getEnvironmentConfiguration());
-          xConfig.addConfigurationListener(new MetricsConfigListener());
-          xConfig.setReloadingStrategy(new FileChangedReloadingStrategy());
-
-          // Start a background Thread that checks a property from the XMLConfiguration
-          // every so often to force the FileChangedReloadingStrategy to fire.
-          if (null == watcher || !watcher.isAlive()) {
-            watcher = new MetricsConfigWatcher();
-            watcher.start();
-          }
-          notFound = false;
-          alreadyWarned = false;
-        } catch (ConfigurationException ce) {
-          log.error("Error reading accumulo-metrics.xml file.");
-          notFound = true;
-          return;
-        }
-      } else {
-        if (!alreadyWarned)
-          log.warn("Unable to find metrics file: " + mFile.getAbsolutePath());
-        alreadyWarned = true;
-        notFound = true;
-        return;
-      }
-    } else {
+    URL metricsUrl = MetricsConfiguration.class.getClassLoader().getResource("accumulo-metrics.xml");
+    if (metricsUrl == null) {
       if (!alreadyWarned)
-        log.warn("ACCUMULO_CONF_DIR variable not found in environment. Metrics collection will be disabled.");
+        log.warn("accumulo-metrics.xml was not found on classpath. Metrics collection will be disabled.");
       alreadyWarned = true;
       notFound = true;
       return;
     }
+
+    try {
+      xConfig = new XMLConfiguration(metricsUrl);
+      xConfig.append(getEnvironmentConfiguration());
+      xConfig.addConfigurationListener(new MetricsConfigListener());
+      xConfig.setReloadingStrategy(new FileChangedReloadingStrategy());
+
+      // Start a background Thread that checks a property from the XMLConfiguration
+      // every so often to force the FileChangedReloadingStrategy to fire.
+      if (null == watcher || !watcher.isAlive()) {
+        watcher = new MetricsConfigWatcher();
+        watcher.start();
+      }
+      notFound = false;
+      alreadyWarned = false;
+    } catch (ConfigurationException ce) {
+      log.error("Error reading accumulo-metrics.xml file.");
+      notFound = true;
+      return;
+    }
+
     if (xConfig != null) {
       config = xConfig.interpolatedConfiguration();
       // set the enabled boolean from the configuration


[2/2] accumulo git commit: Merge branch 'metrics-config'

Posted by mw...@apache.org.
Merge branch 'metrics-config'


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/a1250211
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/a1250211
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/a1250211

Branch: refs/heads/master
Commit: a1250211c52391ab661b0ae53b6253162e8df32d
Parents: 1026e85 192b4e8
Author: Mike Walch <mw...@apache.org>
Authored: Thu Mar 2 12:45:50 2017 -0500
Committer: Mike Walch <mw...@apache.org>
Committed: Thu Mar 2 12:45:50 2017 -0500

----------------------------------------------------------------------
 INSTALL.md                                      |  2 +-
 assemble/bin/accumulo-util                      |  2 +-
 assemble/conf/accumulo-metrics.xml              | 60 --------------
 .../conf/hadoop-metrics2-accumulo.properties    | 86 --------------------
 assemble/conf/templates/accumulo-metrics.xml    | 60 ++++++++++++++
 .../hadoop-metrics2-accumulo.properties         | 86 ++++++++++++++++++++
 .../main/asciidoc/chapters/administration.txt   | 38 +++++----
 .../server/metrics/MetricsConfiguration.java    | 67 +++++++--------
 8 files changed, 198 insertions(+), 203 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/a1250211/docs/src/main/asciidoc/chapters/administration.txt
----------------------------------------------------------------------