You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ed...@apache.org on 2020/02/04 19:40:26 UTC
[accumulo] branch 1.9 updated: Clean-up / remove comments in code
from gc_metrics_backport when merged. (#1499)
This is an automated email from the ASF dual-hosted git repository.
edcoleman pushed a commit to branch 1.9
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/1.9 by this push:
new 60e293b Clean-up / remove comments in code from gc_metrics_backport when merged. (#1499)
60e293b is described below
commit 60e293be2ac175e268d4aea51cb1811b50febeed
Author: EdColeman <de...@etcoleman.com>
AuthorDate: Tue Feb 4 14:40:17 2020 -0500
Clean-up / remove comments in code from gc_metrics_backport when merged. (#1499)
---
.../accumulo/test/functional/GcMetricsIT.java | 22 ++++++++++++++++------
.../accumulo/test/metrics/MetricsFileTailer.java | 13 -------------
2 files changed, 16 insertions(+), 19 deletions(-)
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/GcMetricsIT.java b/test/src/main/java/org/apache/accumulo/test/functional/GcMetricsIT.java
index 968226b..9bde363 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/GcMetricsIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/GcMetricsIT.java
@@ -66,12 +66,8 @@ public class GcMetricsIT extends AccumuloClusterHarness {
Thread t1 = new Thread(gcTail);
t1.start();
- // used for manual jmx / jconsole validation - not for automated testing
- // try {
- // Thread.sleep(320_000);
- // } catch (InterruptedException ex) {
- // Thread.currentThread().interrupt();
- // }
+ // uncomment for manual jmx / jconsole validation - not for automated testing
+ // manualValidationPause();
try {
@@ -108,6 +104,20 @@ public class GcMetricsIT extends AccumuloClusterHarness {
}
/**
+ * This method just sleeps for a while (test will likely time out) The pause is to allow manual
+ * validation of metrics by connecting to the running gc process with jconsole (or other jmx
+ * utility). It should not be used for automatic testing.
+ */
+ @SuppressWarnings("unused")
+ private void manualValidationPause() {
+ try {
+ Thread.sleep(320_000);
+ } catch (InterruptedException ex) {
+ Thread.currentThread().interrupt();
+ }
+ }
+
+ /**
* Validate metrics for consistency withing a run cycle.
*
* @param values
diff --git a/test/src/main/java/org/apache/accumulo/test/metrics/MetricsFileTailer.java b/test/src/main/java/org/apache/accumulo/test/metrics/MetricsFileTailer.java
index 74a71ac..ea829f4 100644
--- a/test/src/main/java/org/apache/accumulo/test/metrics/MetricsFileTailer.java
+++ b/test/src/main/java/org/apache/accumulo/test/metrics/MetricsFileTailer.java
@@ -124,21 +124,8 @@ public class MetricsFileTailer implements Runnable, AutoCloseable {
String filename = propUrl.getFile();
- // Read data from this file
- // File propertiesFile = new File(filename);
-
- // ConfigurationFactory factory = new ConfigurationFactory(filename);
Configuration config = new PropertiesConfiguration(filename);
- // Configurations configs = new Configurations();
- //
- // Configuration config = configs.properties(new File("config.properties"));
- // FileBasedConfigurationBuilder<FileBasedConfiguration> builder =
- // new FileBasedConfigurationBuilder<FileBasedConfiguration>(PropertiesConfiguration.class)
- // .configure(params.fileBased().setFile(propertiesFile));
- //
- // Configuration config = builder.getConfiguration();
-
final Configuration sub = config.subset(metricsPrefix);
if (log.isTraceEnabled()) {