accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [1/4] accumulo git commit: Lift constants into parent interfaces that can be shared across old metrics and metrics2.
Date Fri, 05 Dec 2014 22:56:47 GMT
Repository: accumulo
Updated Branches:
  refs/heads/metrics2-backwardscompat 43df5e7fc -> 73f8e8973


Lift constants into parent interfaces that can be shared across old metrics and metrics2.

Updated the context and record names so that they collapse better in secondary metrics systems


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

Branch: refs/heads/metrics2-backwardscompat
Commit: 20655d71dc79be84437446c407181e094c589c04
Parents: 43df5e7
Author: Josh Elser <elserj@apache.org>
Authored: Fri Dec 5 12:32:30 2014 -0500
Committer: Josh Elser <elserj@apache.org>
Committed: Fri Dec 5 12:32:30 2014 -0500

----------------------------------------------------------------------
 .../apache/accumulo/server/metrics/Metrics.java |   2 +
 .../server/metrics/Metrics2ThriftMetrics.java   |   5 +-
 .../server/metrics/ThriftMetricsKeys.java       |  27 ++++
 .../metrics/Metrics2ReplicationMetrics.java     |   7 +-
 .../metrics/Metrics2TabletServerMetrics.java    |   4 +-
 .../Metrics2TabletServerMinCMetrics.java        |   4 +-
 .../Metrics2TabletServerScanMetrics.java        |   4 +-
 .../Metrics2TabletServerUpdateMetrics.java      |   4 +-
 .../metrics/TabletServerMetricsKeys.java        |  38 +++++
 .../metrics/TabletServerMetricsUtil.java        | 138 +++++++++++++++++++
 .../metrics/TabletServerMinCMetricsKeys.java    |  27 ++++
 .../metrics/TabletServerScanMetricsKeys.java    |  27 ++++
 .../metrics/TabletServerUpdateMetricsKeys.java  |  32 +++++
 13 files changed, 306 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/20655d71/server/base/src/main/java/org/apache/accumulo/server/metrics/Metrics.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/metrics/Metrics.java b/server/base/src/main/java/org/apache/accumulo/server/metrics/Metrics.java
index ef0a1d5..77b30ca 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/metrics/Metrics.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/metrics/Metrics.java
@@ -22,6 +22,8 @@ package org.apache.accumulo.server.metrics;
 public interface Metrics {
 
   String PREFIX = "Accumulo";
+  String TSERVER_RECORD = "TabletServer";
+  String MASTER_RECORD = "Master";
 
   void register() throws Exception;
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/20655d71/server/base/src/main/java/org/apache/accumulo/server/metrics/Metrics2ThriftMetrics.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/metrics/Metrics2ThriftMetrics.java
b/server/base/src/main/java/org/apache/accumulo/server/metrics/Metrics2ThriftMetrics.java
index b7330e3..028d1ae 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/metrics/Metrics2ThriftMetrics.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/metrics/Metrics2ThriftMetrics.java
@@ -27,6 +27,7 @@ import org.apache.hadoop.metrics2.lib.MetricsRegistry;
  *
  */
 public class Metrics2ThriftMetrics implements Metrics, MetricsSource, ThriftMetricsKeys {
+  public static final String RECORD_NAME = "Thrift";
 
   private final MetricsSystem system;
   private final MetricsRegistry registry;
@@ -34,7 +35,7 @@ public class Metrics2ThriftMetrics implements Metrics, MetricsSource, ThriftMetr
 
   Metrics2ThriftMetrics(MetricsSystem system, String serverName, String threadName) {
     this.system = system;
-    this.context = "thrift." + serverName;
+    this.context = serverName;
     this.name = "ThriftMetrics" + serverName;
     this.desc = "Thrift Server Metrics - " + serverName + " " + threadName;
     this.registry = new MetricsRegistry(Interns.info(name, desc));
@@ -57,7 +58,7 @@ public class Metrics2ThriftMetrics implements Metrics, MetricsSource, ThriftMetr
 
   @Override
   public void getMetrics(MetricsCollector collector, boolean all) {
-    MetricsRecordBuilder builder = collector.addRecord("Accumulo").setContext(context);
+    MetricsRecordBuilder builder = collector.addRecord(RECORD_NAME).setContext(context);
 
     registry.snapshot(builder, all);
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/20655d71/server/base/src/main/java/org/apache/accumulo/server/metrics/ThriftMetricsKeys.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/metrics/ThriftMetricsKeys.java
b/server/base/src/main/java/org/apache/accumulo/server/metrics/ThriftMetricsKeys.java
new file mode 100644
index 0000000..f527657
--- /dev/null
+++ b/server/base/src/main/java/org/apache/accumulo/server/metrics/ThriftMetricsKeys.java
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+package org.apache.accumulo.server.metrics;
+
+/**
+ *
+ */
+public interface ThriftMetricsKeys {
+
+  static String idle = "idle";
+  static String execute = "execute";
+
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/20655d71/server/master/src/main/java/org/apache/accumulo/master/metrics/Metrics2ReplicationMetrics.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/metrics/Metrics2ReplicationMetrics.java
b/server/master/src/main/java/org/apache/accumulo/master/metrics/Metrics2ReplicationMetrics.java
index 9e12177..d9269a9 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/metrics/Metrics2ReplicationMetrics.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/metrics/Metrics2ReplicationMetrics.java
@@ -37,6 +37,7 @@ import org.apache.hadoop.metrics2.lib.MetricsRegistry;
  *
  */
 public class Metrics2ReplicationMetrics implements Metrics, MetricsSource {
+  public static final String NAME = "ReplicationMetrics", DESCRIPTION = "Data-Center Replication
Metrics";
   public static final String PENDING_FILES = "filesPendingReplication", NUM_PEERS = "numPeers",
MAX_REPLICATION_THREADS = "maxReplicationThreads";
 
   private final Master master;
@@ -48,7 +49,7 @@ public class Metrics2ReplicationMetrics implements Metrics, MetricsSource
{
     this.master = master;
     this.system = system;
 
-    registry = new MetricsRegistry(Interns.info("ReplicationMetrics", "Data-Center Replication
Metrics"));
+    registry = new MetricsRegistry(Interns.info(NAME, DESCRIPTION));
     replicationUtil = new ReplicationUtil(master);
   }
 
@@ -60,7 +61,7 @@ public class Metrics2ReplicationMetrics implements Metrics, MetricsSource
{
 
   @Override
   public void getMetrics(MetricsCollector collector, boolean all) {
-    MetricsRecordBuilder builder = collector.addRecord("Accumulo").setContext("replication");
+    MetricsRecordBuilder builder = collector.addRecord(MASTER_RECORD).setContext("replication");
 
     snapshot();
 
@@ -69,7 +70,7 @@ public class Metrics2ReplicationMetrics implements Metrics, MetricsSource
{
 
   @Override
   public void register() throws Exception {
-    system.register("ReplicationMetrics", "Data-Center Replication Metrics", this);
+    system.register(NAME, DESCRIPTION, this);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/20655d71/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/Metrics2TabletServerMetrics.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/Metrics2TabletServerMetrics.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/Metrics2TabletServerMetrics.java
index 1ab2319..7aacf1f 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/Metrics2TabletServerMetrics.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/Metrics2TabletServerMetrics.java
@@ -30,7 +30,7 @@ import org.apache.hadoop.metrics2.lib.MutableGaugeLong;
  *
  */
 public class Metrics2TabletServerMetrics implements Metrics, MetricsSource, TabletServerMetricsKeys
{
-  public static final String NAME = "TabletServerMetrics", DESCRIPTION = "General TabletServer
Metrics", CONTEXT = "tserver";
+  public static final String NAME = "GeneralMetrics", DESCRIPTION = "General TabletServer
Metrics", CONTEXT = "general";
 
   private final TabletServerMetricsUtil util;
   private final MetricsSystem system;
@@ -90,7 +90,7 @@ public class Metrics2TabletServerMetrics implements Metrics, MetricsSource,
Tabl
 
   @Override
   public void getMetrics(MetricsCollector collector, boolean all) {
-    MetricsRecordBuilder builder = collector.addRecord(PREFIX).setContext(CONTEXT);
+    MetricsRecordBuilder builder = collector.addRecord(TSERVER_RECORD).setContext(CONTEXT);
 
     // Update each MutableMetric with the new value
     snapshot();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/20655d71/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/Metrics2TabletServerMinCMetrics.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/Metrics2TabletServerMinCMetrics.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/Metrics2TabletServerMinCMetrics.java
index 11af88b..a8d5933 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/Metrics2TabletServerMinCMetrics.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/Metrics2TabletServerMinCMetrics.java
@@ -29,7 +29,7 @@ import org.apache.hadoop.metrics2.lib.MutableStat;
  *
  */
 public class Metrics2TabletServerMinCMetrics implements Metrics, MetricsSource, TabletServerMinCMetricsKeys
{
-  public static final String NAME = "MinorCompactionMetrics", DESCRIPTION = "TabletServer
Minor Compaction Metrics", CONTEXT = "tserver.minc";
+  public static final String NAME = "MinorCompactionMetrics", DESCRIPTION = "TabletServer
Minor Compaction Metrics", CONTEXT = "minc";
 
   private final MetricsSystem system;
   private final MetricsRegistry registry;
@@ -65,7 +65,7 @@ public class Metrics2TabletServerMinCMetrics implements Metrics, MetricsSource,
 
   @Override
   public void getMetrics(MetricsCollector collector, boolean all) {
-    MetricsRecordBuilder builder = collector.addRecord(PREFIX).setContext(CONTEXT);
+    MetricsRecordBuilder builder = collector.addRecord(TSERVER_RECORD).setContext(CONTEXT);
 
     registry.snapshot(builder, all);
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/20655d71/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/Metrics2TabletServerScanMetrics.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/Metrics2TabletServerScanMetrics.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/Metrics2TabletServerScanMetrics.java
index bca7f9c..245a2bf 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/Metrics2TabletServerScanMetrics.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/Metrics2TabletServerScanMetrics.java
@@ -29,7 +29,7 @@ import org.apache.hadoop.metrics2.lib.MutableStat;
  *
  */
 public class Metrics2TabletServerScanMetrics implements Metrics, MetricsSource, TabletServerScanMetricsKeys
{
-  public static final String NAME = "ScanMetrics", DESCRIPTION = "TabletServer Scan Metrics",
CONTEXT = "tserver.scan";
+  public static final String NAME = "ScanMetrics", DESCRIPTION = "TabletServer Scan Metrics",
CONTEXT = "scan";
 
   private final MetricsSystem system;
   private final MetricsRegistry registry;
@@ -67,7 +67,7 @@ public class Metrics2TabletServerScanMetrics implements Metrics, MetricsSource,
 
   @Override
   public void getMetrics(MetricsCollector collector, boolean all) {
-    MetricsRecordBuilder builder = collector.addRecord(PREFIX).setContext(CONTEXT);
+    MetricsRecordBuilder builder = collector.addRecord(TSERVER_RECORD).setContext(CONTEXT);
 
     registry.snapshot(builder, all);
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/20655d71/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/Metrics2TabletServerUpdateMetrics.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/Metrics2TabletServerUpdateMetrics.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/Metrics2TabletServerUpdateMetrics.java
index 916c616..83670c0 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/Metrics2TabletServerUpdateMetrics.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/Metrics2TabletServerUpdateMetrics.java
@@ -30,7 +30,7 @@ import org.apache.hadoop.metrics2.lib.MutableStat;
  *
  */
 public class Metrics2TabletServerUpdateMetrics implements Metrics, MetricsSource, TabletServerUpdateMetricsKeys
{
-  public static final String NAME = "UpdateMetrics", DESCRIPTION = "TabletServer Update Metrics",
CONTEXT = "tserver.update";
+  public static final String NAME = "UpdateMetrics", DESCRIPTION = "TabletServer Update Metrics",
CONTEXT = "update";
 
   private final MetricsSystem system;
   private final MetricsRegistry registry;
@@ -86,7 +86,7 @@ public class Metrics2TabletServerUpdateMetrics implements Metrics, MetricsSource
 
   @Override
   public void getMetrics(MetricsCollector collector, boolean all) {
-    MetricsRecordBuilder builder = collector.addRecord(PREFIX).setContext(CONTEXT);
+    MetricsRecordBuilder builder = collector.addRecord(TSERVER_RECORD).setContext(CONTEXT);
 
     registry.snapshot(builder, all);
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/20655d71/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMetricsKeys.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMetricsKeys.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMetricsKeys.java
new file mode 100644
index 0000000..1d8d1af
--- /dev/null
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMetricsKeys.java
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+package org.apache.accumulo.tserver.metrics;
+
+/**
+ * Keys for general tablet server metrics
+ */
+public interface TabletServerMetricsKeys {
+
+  String ENTRIES = "entries";
+  String ENTRIES_IN_MEM = "entriesInMem";
+  String HOLD_TIME = "holdTime";
+  String FILES_PER_TABLET = "filesPerTablet";
+  String ACTIVE_MAJCS = "activeMajCs";
+  String QUEUED_MAJCS = "queuedMajCs";
+  String ACTIVE_MINCS = "activeMinCs";
+  String QUEUED_MINCS = "queuedMinCs";
+  String ONLINE_TABLETS = "onlineTablets";
+  String OPENING_TABLETS = "openingTablets";
+  String UNOPENED_TABLETS = "unopenedTablets";
+  String QUERIES = "queries";
+  String TOTAL_MINCS = "totalMinCs";
+
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/20655d71/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMetricsUtil.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMetricsUtil.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMetricsUtil.java
new file mode 100644
index 0000000..5905aea
--- /dev/null
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMetricsUtil.java
@@ -0,0 +1,138 @@
+/*
+ * 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.
+ */
+package org.apache.accumulo.tserver.metrics;
+
+import org.apache.accumulo.tserver.TabletServer;
+import org.apache.accumulo.tserver.tablet.Tablet;
+
+/**
+ * Wrapper around extracting metrics from a TabletServer instance
+ *
+ * Necessary to support both old custom JMX metrics and Hadoop Metrics2
+ */
+public class TabletServerMetricsUtil {
+
+  private final TabletServer tserver;
+
+  public TabletServerMetricsUtil(TabletServer tserver) {
+    this.tserver = tserver;
+  }
+
+  public long getEntries() {
+    long result = 0;
+    for (Tablet tablet : tserver.getOnlineTablets()) {
+      result += tablet.getNumEntries();
+    }
+    return result;
+  }
+
+  public long getEntriesInMemory() {
+    long result = 0;
+    for (Tablet tablet : tserver.getOnlineTablets()) {
+      result += tablet.getNumEntriesInMemory();
+    }
+    return result;
+  }
+
+  public long getIngest() {
+    long result = 0;
+    for (Tablet tablet : tserver.getOnlineTablets()) {
+      result += tablet.getNumEntriesInMemory();
+    }
+    return result;
+  }
+
+  public int getMajorCompactions() {
+    int result = 0;
+    for (Tablet tablet : tserver.getOnlineTablets()) {
+      if (tablet.isMajorCompactionRunning())
+        result++;
+    }
+    return result;
+  }
+
+  public int getMajorCompactionsQueued() {
+    int result = 0;
+    for (Tablet tablet : tserver.getOnlineTablets()) {
+      if (tablet.isMajorCompactionQueued())
+        result++;
+    }
+    return result;
+  }
+
+  public int getMinorCompactions() {
+    int result = 0;
+    for (Tablet tablet : tserver.getOnlineTablets()) {
+      if (tablet.isMinorCompactionRunning())
+        result++;
+    }
+    return result;
+  }
+
+  public int getMinorCompactionsQueued() {
+    int result = 0;
+    for (Tablet tablet : tserver.getOnlineTablets()) {
+      if (tablet.isMinorCompactionQueued())
+        result++;
+    }
+    return result;
+  }
+
+  public int getOnlineCount() {
+    return tserver.getOnlineTablets().size();
+  }
+
+  public int getOpeningCount() {
+    return tserver.getOpeningCount();
+  }
+
+  public long getQueries() {
+    long result = 0;
+    for (Tablet tablet : tserver.getOnlineTablets()) {
+      result += tablet.totalQueries();
+    }
+    return result;
+  }
+
+  public int getUnopenedCount() {
+    return tserver.getUnopenedCount();
+  }
+
+  public String getName() {
+    return tserver.getClientAddressString();
+  }
+
+  public long getTotalMinorCompactions() {
+    return tserver.getTotalMinorCompactions();
+  }
+
+  public double getHoldTime() {
+    return tserver.getHoldTimeMillis() / 1000.;
+  }
+
+  public double getAverageFilesPerTablet() {
+    int count = 0;
+    long result = 0;
+    for (Tablet tablet : tserver.getOnlineTablets()) {
+      result += tablet.getDatafiles().size();
+      count++;
+    }
+    if (count == 0)
+      return 0;
+    return result / (double) count;
+  }
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/20655d71/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMinCMetricsKeys.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMinCMetricsKeys.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMinCMetricsKeys.java
new file mode 100644
index 0000000..29d4846
--- /dev/null
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMinCMetricsKeys.java
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+package org.apache.accumulo.tserver.metrics;
+
+/**
+ * Keys to reference minor compaction metrics
+ */
+public interface TabletServerMinCMetricsKeys {
+
+  String MINC = "minc";
+  String QUEUE = "queue";
+
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/20655d71/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerScanMetricsKeys.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerScanMetricsKeys.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerScanMetricsKeys.java
new file mode 100644
index 0000000..7d33a84
--- /dev/null
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerScanMetricsKeys.java
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+package org.apache.accumulo.tserver.metrics;
+
+/**
+ * Keys for referencing scan metrics
+ */
+public interface TabletServerScanMetricsKeys {
+
+  String SCAN = "scan";
+  String RESULT_SIZE = "result";
+
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/20655d71/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerUpdateMetricsKeys.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerUpdateMetricsKeys.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerUpdateMetricsKeys.java
new file mode 100644
index 0000000..f06751b
--- /dev/null
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerUpdateMetricsKeys.java
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+package org.apache.accumulo.tserver.metrics;
+
+/**
+ * Keys to identify which update metric is being altered
+ */
+public interface TabletServerUpdateMetricsKeys {
+
+  static String PERMISSION_ERRORS = "permissionErrors";
+  static String UNKNOWN_TABLET_ERRORS = "unknownTabletErrors";
+  static String MUTATION_ARRAY_SIZE = "mutationArraysSize";
+  static String COMMIT_PREP = "commitPrep";
+  static String CONSTRAINT_VIOLATIONS = "constraintViolations";
+  static String WALOG_WRITE_TIME = "waLogWriteTime";
+  static String COMMIT_TIME = "commitTime";
+
+}


Mime
View raw message