lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kris...@apache.org
Subject [42/43] lucene-solr:jira/solr-8593: SOLR-9947 Clean up metrics and SolrInfoMBean categories. Add a hierarhical view of SolrInfoMBeans in JMX.
Date Thu, 12 Jan 2017 16:51:59 GMT
SOLR-9947 Clean up metrics and SolrInfoMBean categories. Add a hierarhical view of
SolrInfoMBeans in JMX.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/6c6c0774
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/6c6c0774
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/6c6c0774

Branch: refs/heads/jira/solr-8593
Commit: 6c6c077435bcc5bd3f4520a70a4c678d4b3f7661
Parents: d2664b1
Author: Andrzej Bialecki <ab@apache.org>
Authored: Thu Jan 12 13:14:12 2017 +0100
Committer: Andrzej Bialecki <ab@apache.org>
Committed: Thu Jan 12 13:14:12 2017 +0100

----------------------------------------------------------------------
 solr/CHANGES.txt                                |   3 +
 .../org/apache/solr/core/CoreContainer.java     |  10 +-
 .../org/apache/solr/core/JmxMonitoredMap.java   |  63 ++++++--
 .../org/apache/solr/core/SolrInfoMBean.java     |   5 +-
 .../apache/solr/handler/CdcrRequestHandler.java |   5 +
 .../apache/solr/handler/PingRequestHandler.java |   5 +
 .../apache/solr/handler/ReplicationHandler.java |   5 +
 .../apache/solr/handler/RequestHandlerBase.java |   2 +-
 .../org/apache/solr/handler/SchemaHandler.java  |   5 +
 .../apache/solr/handler/SolrConfigHandler.java  |   2 +-
 .../solr/handler/UpdateRequestHandler.java      |   5 +
 .../solr/handler/admin/CollectionsHandler.java  |   5 +
 .../solr/handler/admin/ConfigSetsHandler.java   |   5 +
 .../solr/handler/admin/CoreAdminHandler.java    |   5 +
 .../apache/solr/handler/admin/InfoHandler.java  |   5 +
 .../solr/handler/admin/LoggingHandler.java      |   6 +
 .../solr/handler/admin/LukeRequestHandler.java  |   5 +
 .../solr/handler/admin/MetricsHandler.java      |   5 +
 .../solr/handler/admin/PluginInfoHandler.java   |   5 +
 .../handler/admin/PropertiesRequestHandler.java |   5 +
 .../solr/handler/admin/SecurityConfHandler.java |   5 +
 .../admin/SegmentsInfoRequestHandler.java       |   5 +
 .../handler/admin/ShowFileRequestHandler.java   |   4 +
 .../handler/admin/SolrInfoMBeanHandler.java     |   5 +
 .../solr/handler/admin/SystemInfoHandler.java   |   7 +-
 .../solr/handler/admin/ThreadDumpHandler.java   |   5 +
 .../handler/admin/ZookeeperInfoHandler.java     |   5 +
 .../solr/handler/component/DebugComponent.java  |   5 +
 .../solr/handler/component/ExpandComponent.java |   5 +
 .../solr/handler/component/FacetComponent.java  |   5 +
 .../handler/component/HighlightComponent.java   |   5 +
 .../component/HttpShardHandlerFactory.java      |   2 +-
 .../component/MoreLikeThisComponent.java        |   7 +-
 .../solr/handler/component/QueryComponent.java  |   5 +
 .../handler/component/RealTimeGetComponent.java |   5 +
 .../handler/component/SpellCheckComponent.java  |   5 +
 .../handler/component/TermVectorComponent.java  |   5 +
 .../solr/handler/component/TermsComponent.java  |   5 +
 .../solr/highlight/HighlightingPluginBase.java  |   2 +-
 .../solr/metrics/SolrCoreMetricManager.java     |   3 +-
 .../metrics/reporters/JmxObjectNameFactory.java | 155 +++++++++++++++++++
 .../solr/metrics/reporters/SolrJmxReporter.java | 105 -------------
 .../apache/solr/search/facet/FacetModule.java   |   5 +
 .../solr/security/PKIAuthenticationPlugin.java  |   6 +
 .../solr/update/DirectUpdateHandler2.java       |   5 -
 .../org/apache/solr/update/UpdateHandler.java   |   5 +
 .../java/org/apache/solr/update/UpdateLog.java  |  28 ++--
 .../apache/solr/update/UpdateShardHandler.java  |   2 +-
 .../test-files/solr/solr-gangliareporter.xml    |   2 +-
 .../test-files/solr/solr-graphitereporter.xml   |   2 +-
 .../src/test-files/solr/solr-slf4jreporter.xml  |   4 +-
 .../solr/cloud/BasicDistributedZkTest.java      |   2 +-
 .../solr/handler/admin/MBeansHandlerTest.java   |   4 +-
 .../solr/handler/admin/MetricsHandlerTest.java  |  18 +--
 .../metrics/SolrMetricsIntegrationTest.java     |   2 +-
 .../reporters/SolrGangliaReporterTest.java      |   2 +-
 .../reporters/SolrGraphiteReporterTest.java     |   2 +-
 .../org/apache/solr/search/TestRecovery.java    |   2 +-
 .../client/solrj/impl/CloudSolrClientTest.java  |   6 +-
 59 files changed, 438 insertions(+), 170 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 0cf50d4..b6055fe 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -242,6 +242,9 @@ New Features
 
 * SOLR-9886: Add a 'enable' flag to caches to enable/disable them (Pushkar Raste, noble)
 
+* SOLR-9947: Clean up some SolrInfoMBean categories. Add an alternative hierarchical view in JMX
+  for SolrInfoMBeans, which uses similar conventions to SolrJmxReporter. (ab)
+
 Optimizations
 ----------------------
 * SOLR-9704: Facet Module / JSON Facet API: Optimize blockChildren facets that have

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/core/CoreContainer.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/core/CoreContainer.java b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
index 8a72617..3c4ed56 100644
--- a/solr/core/src/java/org/apache/solr/core/CoreContainer.java
+++ b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
@@ -466,7 +466,7 @@ public class CoreContainer {
     coreContainerWorkExecutor = MetricUtils.instrumentedExecutorService(
         coreContainerWorkExecutor,
         metricManager.registry(SolrMetricManager.getRegistryName(SolrInfoMBean.Group.node)),
-        SolrMetricManager.mkName("coreContainerWorkExecutor", "threadPool"));
+        SolrMetricManager.mkName("coreContainerWorkExecutor", SolrInfoMBean.Category.CONTAINER.toString(), "threadPool"));
 
     shardHandlerFactory = ShardHandlerFactory.newInstance(cfg.getShardHandlerFactoryPluginInfo(), loader);
     if (shardHandlerFactory instanceof SolrMetricProducer) {
@@ -518,11 +518,11 @@ public class CoreContainer {
     Gauge<Integer> unloadedCores = () -> solrCores.getAllCoreNames().size() - solrCores.getCoreNames().size();
 
     metricManager.register(SolrMetricManager.getRegistryName(SolrInfoMBean.Group.node),
-        loadedCores, true, "loaded", "cores");
+        loadedCores, true, "loaded", SolrInfoMBean.Category.CONTAINER.toString(), "cores");
     metricManager.register(SolrMetricManager.getRegistryName(SolrInfoMBean.Group.node),
-        lazyCores, true, "lazy", "cores");
+        lazyCores, true, "lazy",SolrInfoMBean.Category.CONTAINER.toString(), "cores");
     metricManager.register(SolrMetricManager.getRegistryName(SolrInfoMBean.Group.node),
-        unloadedCores, true, "unloaded", "cores");
+        unloadedCores, true, "unloaded",SolrInfoMBean.Category.CONTAINER.toString(), "cores");
 
     // setup executor to load cores in parallel
     ExecutorService coreLoadExecutor = MetricUtils.instrumentedExecutorService(
@@ -530,7 +530,7 @@ public class CoreContainer {
             cfg.getCoreLoadThreadCount(isZooKeeperAware()),
             new DefaultSolrThreadFactory("coreLoadExecutor")),
         metricManager.registry(SolrMetricManager.getRegistryName(SolrInfoMBean.Group.node)),
-        SolrMetricManager.mkName("coreLoadExecutor", "threadPool"));
+        SolrMetricManager.mkName("coreLoadExecutor",SolrInfoMBean.Category.CONTAINER.toString(), "threadPool"));
     final List<Future<SolrCore>> futures = new ArrayList<>();
     try {
       List<CoreDescriptor> cds = coresLocator.discover(this);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/core/JmxMonitoredMap.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/core/JmxMonitoredMap.java b/solr/core/src/java/org/apache/solr/core/JmxMonitoredMap.java
index a5a27dc..b2a5c79 100644
--- a/solr/core/src/java/org/apache/solr/core/JmxMonitoredMap.java
+++ b/solr/core/src/java/org/apache/solr/core/JmxMonitoredMap.java
@@ -53,6 +53,8 @@ import org.apache.lucene.store.AlreadyClosedException;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.core.SolrConfig.JmxConfiguration;
+import org.apache.solr.metrics.SolrCoreMetricManager;
+import org.apache.solr.metrics.reporters.JmxObjectNameFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -75,15 +77,21 @@ public class JmxMonitoredMap<K, V> extends
         ConcurrentHashMap<String, SolrInfoMBean> {
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
+  private static final String REPORTER_NAME = "_jmx_";
+
   // set to true to use cached statistics NamedLists between getMBeanInfo calls to work
   // around over calling getStatistics on MBeanInfos when iterating over all attributes (SOLR-6586)
-  private boolean useCachedStatsBetweenGetMBeanInfoCalls = Boolean.getBoolean("useCachedStatsBetweenGetMBeanInfoCalls");
+  private final boolean useCachedStatsBetweenGetMBeanInfoCalls = Boolean.getBoolean("useCachedStatsBetweenGetMBeanInfoCalls");
   
-  private MBeanServer server = null;
+  private final MBeanServer server;
+
+  private final String jmxRootName;
 
-  private String jmxRootName;
+  private final String coreHashCode;
 
-  private String coreHashCode;
+  private final JmxObjectNameFactory nameFactory;
+
+  private final String registryName;
 
   public JmxMonitoredMap(String coreName, String coreHashCode,
                          final JmxConfiguration jmxConfig) {
@@ -108,6 +116,9 @@ public class JmxMonitoredMap<K, V> extends
       }
 
       if (servers == null || servers.isEmpty()) {
+        server = null;
+        registryName = null;
+        nameFactory = null;
         log.debug("No JMX servers found, not exposing Solr information with JMX.");
         return;
       }
@@ -115,20 +126,23 @@ public class JmxMonitoredMap<K, V> extends
       log.info("JMX monitoring is enabled. Adding Solr mbeans to JMX Server: "
                + server);
     } else {
+      MBeanServer newServer = null;
       try {
         // Create a new MBeanServer with the given serviceUrl
-        server = MBeanServerFactory.newMBeanServer();
+        newServer = MBeanServerFactory.newMBeanServer();
         JMXConnectorServer connector = JMXConnectorServerFactory
                 .newJMXConnectorServer(new JMXServiceURL(jmxConfig.serviceUrl),
-                        null, server);
+                        null, newServer);
         connector.start();
         log.info("JMX monitoring is enabled at " + jmxConfig.serviceUrl);
       } catch (Exception e) {
         // Release the reference
-        server = null;
         throw new RuntimeException("Could not start JMX monitoring ", e);
       }
+      server = newServer;
     }
+    registryName = SolrCoreMetricManager.createRegistryName(null, coreName);
+    nameFactory = new JmxObjectNameFactory(REPORTER_NAME + coreHashCode, registryName);
   }
 
   /**
@@ -138,12 +152,12 @@ public class JmxMonitoredMap<K, V> extends
   @Override
   public void clear() {
     if (server != null) {
-      QueryExp exp = Query.eq(Query.attr("coreHashCode"), Query.value(coreHashCode));
+      QueryExp exp = Query.or(Query.eq(Query.attr("coreHashCode"), Query.value(coreHashCode)),
+                            Query.eq(Query.attr("reporter"), Query.value(REPORTER_NAME + coreHashCode)));
       
       Set<ObjectName> objectNames = null;
       try {
-        ObjectName instance = new ObjectName(jmxRootName + ":*");
-        objectNames = server.queryNames(instance, exp);
+        objectNames = server.queryNames(null, exp);
       } catch (Exception e) {
         log.warn("Exception querying for mbeans", e);
       }
@@ -175,19 +189,39 @@ public class JmxMonitoredMap<K, V> extends
   public SolrInfoMBean put(String key, SolrInfoMBean infoBean) {
     if (server != null && infoBean != null) {
       try {
+        // back-compat name
         ObjectName name = getObjectName(key, infoBean);
         if (server.isRegistered(name))
           server.unregisterMBean(name);
         SolrDynamicMBean mbean = new SolrDynamicMBean(coreHashCode, infoBean, useCachedStatsBetweenGetMBeanInfoCalls);
         server.registerMBean(mbean, name);
+        // now register it also under new name
+        String beanName = createBeanName(infoBean, key);
+        name = nameFactory.createName(null, registryName, beanName);
+        if (server.isRegistered(name))
+          server.unregisterMBean(name);
+        server.registerMBean(mbean, name);
       } catch (Exception e) {
-        log.warn( "Failed to register info bean: " + key, e);
+        log.warn( "Failed to register info bean: key=" + key + ", infoBean=" + infoBean, e);
       }
     }
 
     return super.put(key, infoBean);
   }
 
+  private String createBeanName(SolrInfoMBean infoBean, String key) {
+    if (infoBean.getCategory() == null) {
+      throw new IllegalArgumentException("SolrInfoMBean.category must never be null: " + infoBean);
+    }
+    StringBuilder sb = new StringBuilder();
+    sb.append(infoBean.getCategory().toString());
+    sb.append('.');
+    sb.append(key);
+    sb.append('.');
+    sb.append(infoBean.getName());
+    return sb.toString();
+  }
+
   /**
    * Removes the SolrInfoMBean object at the given key and unregisters it from
    * MBeanServer
@@ -212,10 +246,17 @@ public class JmxMonitoredMap<K, V> extends
       return;
 
     try {
+      // remove legacy name
       ObjectName name = getObjectName(key, infoBean);
       if (server.isRegistered(name) && coreHashCode.equals(server.getAttribute(name, "coreHashCode"))) {
         server.unregisterMBean(name);
       }
+      // remove new name
+      String beanName = createBeanName(infoBean, key);
+      name = nameFactory.createName(null, registryName, beanName);
+      if (server.isRegistered(name)) {
+        server.unregisterMBean(name);
+      }
     } catch (Exception e) {
       throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,
               "Failed to unregister info bean: " + key, e);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/core/SolrInfoMBean.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/core/SolrInfoMBean.java b/solr/core/src/java/org/apache/solr/core/SolrInfoMBean.java
index 04c8395..bf77db4 100644
--- a/solr/core/src/java/org/apache/solr/core/SolrInfoMBean.java
+++ b/solr/core/src/java/org/apache/solr/core/SolrInfoMBean.java
@@ -30,9 +30,10 @@ import org.apache.solr.common.util.NamedList;
 public interface SolrInfoMBean {
 
   /**
-   * Category of {@link SolrCore} component.
+   * Category of Solr component.
    */
-  enum Category { CORE, QUERYHANDLER, UPDATEHANDLER, CACHE, HIGHLIGHTING, QUERYPARSER, SEARCHER, REPLICATION, TLOG, INDEX, DIRECTORY, HTTP, OTHER }
+  enum Category { CONTAINER, ADMIN, CORE, QUERY, UPDATE, CACHE, HIGHLIGHTER, QUERYPARSER, SPELLCHECKER,
+    SEARCHER, REPLICATION, TLOG, INDEX, DIRECTORY, HTTP, OTHER }
 
   /**
    * Top-level group of beans for a subsystem.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/CdcrRequestHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/CdcrRequestHandler.java b/solr/core/src/java/org/apache/solr/handler/CdcrRequestHandler.java
index f706637..fcc4bbe 100644
--- a/solr/core/src/java/org/apache/solr/handler/CdcrRequestHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/CdcrRequestHandler.java
@@ -806,6 +806,11 @@ public class CdcrRequestHandler extends RequestHandlerBase implements SolrCoreAw
     return "Manage Cross Data Center Replication";
   }
 
+  @Override
+  public Category getCategory() {
+    return Category.REPLICATION;
+  }
+
   /**
    * A thread subclass for executing a single
    * {@link org.apache.solr.handler.CdcrParams.CdcrAction#SHARDCHECKPOINT} action.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java b/solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java
index 4b72e0f..04b930a 100644
--- a/solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java
@@ -328,4 +328,9 @@ public class PingRequestHandler extends RequestHandlerBase implements SolrCoreAw
   public String getDescription() {
     return "Reports application health to a load-balancer";
   }
+
+  @Override
+  public Category getCategory() {
+    return Category.ADMIN;
+  }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java b/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
index edf5e94..b875144 100644
--- a/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
@@ -814,6 +814,11 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw
   }
 
   @Override
+  public Category getCategory() {
+    return Category.REPLICATION;
+  }
+
+  @Override
   public String getDescription() {
     return "ReplicationHandler provides replication of index and configuration files from Master to Slaves";
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/RequestHandlerBase.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/RequestHandlerBase.java b/solr/core/src/java/org/apache/solr/handler/RequestHandlerBase.java
index 1fd6c30..b70c096 100644
--- a/solr/core/src/java/org/apache/solr/handler/RequestHandlerBase.java
+++ b/solr/core/src/java/org/apache/solr/handler/RequestHandlerBase.java
@@ -227,7 +227,7 @@ public abstract class RequestHandlerBase implements SolrRequestHandler, SolrInfo
   
   @Override
   public Category getCategory() {
-    return Category.QUERYHANDLER;
+    return Category.QUERY;
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/SchemaHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/SchemaHandler.java b/solr/core/src/java/org/apache/solr/handler/SchemaHandler.java
index 35e463b..9c2d45c 100644
--- a/solr/core/src/java/org/apache/solr/handler/SchemaHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/SchemaHandler.java
@@ -252,6 +252,11 @@ public class SchemaHandler extends RequestHandlerBase implements SolrCoreAware,
   }
 
   @Override
+  public Category getCategory() {
+    return Category.ADMIN;
+  }
+
+  @Override
   public void inform(SolrCore core) {
     isImmutableConfigSet = SolrConfigHandler.getImmutable(core);
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/SolrConfigHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/SolrConfigHandler.java b/solr/core/src/java/org/apache/solr/handler/SolrConfigHandler.java
index b6cb596..1c584b1 100644
--- a/solr/core/src/java/org/apache/solr/handler/SolrConfigHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/SolrConfigHandler.java
@@ -708,7 +708,7 @@ public class SolrConfigHandler extends RequestHandlerBase implements SolrCoreAwa
 
   @Override
   public Category getCategory() {
-    return Category.OTHER;
+    return Category.ADMIN;
   }
 
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/UpdateRequestHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/UpdateRequestHandler.java b/solr/core/src/java/org/apache/solr/handler/UpdateRequestHandler.java
index 7c97331..6628368 100644
--- a/solr/core/src/java/org/apache/solr/handler/UpdateRequestHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/UpdateRequestHandler.java
@@ -170,6 +170,11 @@ public class UpdateRequestHandler extends ContentStreamHandlerBase implements Pe
     return "Add documents using XML (with XSLT), CSV, JSON, or javabin";
   }
 
+  @Override
+  public Category getCategory() {
+    return Category.UPDATE;
+  }
+
   public static final String DOC_PATH = "/update/json/docs";
   public static final String JSON_PATH = "/update/json";
   public static final String CSV_PATH = "/update/csv";

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
index e683e96..148d73c 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
@@ -335,6 +335,11 @@ public class CollectionsHandler extends RequestHandlerBase implements Permission
     return "Manage SolrCloud Collections";
   }
 
+  @Override
+  public Category getCategory() {
+    return Category.ADMIN;
+  }
+
   public static final String SYSTEM_COLL = ".system";
 
   private static void createSysConfigSet(CoreContainer coreContainer) throws KeeperException, InterruptedException {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/admin/ConfigSetsHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/ConfigSetsHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/ConfigSetsHandler.java
index ab2b172..f3a8dd2 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/ConfigSetsHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/ConfigSetsHandler.java
@@ -161,6 +161,11 @@ public class ConfigSetsHandler extends RequestHandlerBase {
     return "Manage SolrCloud ConfigSets";
   }
 
+  @Override
+  public Category getCategory() {
+    return Category.ADMIN;
+  }
+
   enum ConfigSetOperation {
     CREATE_OP(CREATE) {
       @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
index 05a1671..a415d8a 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
@@ -275,6 +275,11 @@ public class CoreAdminHandler extends RequestHandlerBase implements PermissionNa
   }
 
   @Override
+  public Category getCategory() {
+    return Category.ADMIN;
+  }
+
+  @Override
   public Name getPermissionName(AuthorizationContext ctx) {
     String action = ctx.getParams().get(CoreAdminParams.ACTION);
     if (action == null) return CORE_READ_PERM;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/admin/InfoHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/InfoHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/InfoHandler.java
index 9c437ab..8fdac21 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/InfoHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/InfoHandler.java
@@ -103,6 +103,11 @@ public class InfoHandler extends RequestHandlerBase {
     return "System Information";
   }
 
+  @Override
+  public Category getCategory() {
+    return Category.ADMIN;
+  }
+
   protected PropertiesRequestHandler getPropertiesHandler() {
     return propertiesHandler;
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/admin/LoggingHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/LoggingHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/LoggingHandler.java
index a561594..b10aed1 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/LoggingHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/LoggingHandler.java
@@ -156,4 +156,10 @@ public class LoggingHandler extends RequestHandlerBase implements SolrCoreAware
   public String getDescription() {
     return "Logging Handler";
   }
+
+  @Override
+  public Category getCategory() {
+    return Category.ADMIN;
+  }
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
index d7dedf1..50f46ef 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
@@ -703,6 +703,11 @@ public class LukeRequestHandler extends RequestHandlerBase
   }
 
   @Override
+  public Category getCategory() {
+    return Category.ADMIN;
+  }
+
+  @Override
   public URL[] getDocs() {
     try {
       return new URL[] { new URL("http://wiki.apache.org/solr/LukeRequestHandler") };

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/admin/MetricsHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/MetricsHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/MetricsHandler.java
index 428a72b..0c87875 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/MetricsHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/MetricsHandler.java
@@ -155,6 +155,11 @@ public class MetricsHandler extends RequestHandlerBase implements PermissionName
     return "A handler to return all the metrics gathered by Solr";
   }
 
+  @Override
+  public Category getCategory() {
+    return Category.ADMIN;
+  }
+
   enum MetricType {
     histogram(Histogram.class),
     meter(Meter.class),

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/admin/PluginInfoHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/PluginInfoHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/PluginInfoHandler.java
index 6bc34ed..a096e79 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/PluginInfoHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/PluginInfoHandler.java
@@ -90,4 +90,9 @@ public class PluginInfoHandler extends RequestHandlerBase
   public String getDescription() {
     return "Registry";
   }
+
+  @Override
+  public Category getCategory() {
+    return Category.ADMIN;
+  }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/admin/PropertiesRequestHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/PropertiesRequestHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/PropertiesRequestHandler.java
index bae61a7..c16cded 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/PropertiesRequestHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/PropertiesRequestHandler.java
@@ -55,4 +55,9 @@ public class PropertiesRequestHandler extends RequestHandlerBase
   public String getDescription() {
     return "Get System Properties";
   }
+
+  @Override
+  public Category getCategory() {
+    return Category.ADMIN;
+  }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/admin/SecurityConfHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/SecurityConfHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/SecurityConfHandler.java
index 88e4b01..1b81722 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/SecurityConfHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/SecurityConfHandler.java
@@ -163,6 +163,11 @@ public abstract class SecurityConfHandler extends RequestHandlerBase implements
     return "Edit or read security configuration";
   }
 
+  @Override
+  public Category getCategory() {
+    return Category.ADMIN;
+  }
+
   /**
    * Gets security.json from source
    */

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/admin/SegmentsInfoRequestHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/SegmentsInfoRequestHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/SegmentsInfoRequestHandler.java
index df1bbd8..1baf25a 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/SegmentsInfoRequestHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/SegmentsInfoRequestHandler.java
@@ -117,4 +117,9 @@ public class SegmentsInfoRequestHandler extends RequestHandlerBase {
   public String getDescription() {
     return "Lucene segments info.";
   }
+
+  @Override
+  public Category getCategory() {
+    return Category.ADMIN;
+  }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java
index ea08438..805a690 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java
@@ -364,4 +364,8 @@ public class ShowFileRequestHandler extends RequestHandlerBase
   public String getDescription() {
     return "Admin Config File -- view or update config files directly";
   }
+  @Override
+  public Category getCategory() {
+    return Category.ADMIN;
+  }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java
index 4d3c2b5..f5f28c5 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java
@@ -298,4 +298,9 @@ public class SolrInfoMBeanHandler extends RequestHandlerBase {
   public String getDescription() {
     return "Get Info (and statistics) for registered SolrInfoMBeans";
   }
+
+  @Override
+  public Category getCategory() {
+    return Category.ADMIN;
+  }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java
index a873c09..d031d69 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java
@@ -408,7 +408,12 @@ public class SystemInfoHandler extends RequestHandlerBase
   public String getDescription() {
     return "Get System Info";
   }
-  
+
+  @Override
+  public Category getCategory() {
+    return Category.ADMIN;
+  }
+
   private static final long ONE_KB = 1024;
   private static final long ONE_MB = ONE_KB * ONE_KB;
   private static final long ONE_GB = ONE_KB * ONE_MB;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java
index 3ddc9db..f0e3970 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java
@@ -130,4 +130,9 @@ public class ThreadDumpHandler extends RequestHandlerBase
   public String getDescription() {
     return "Thread Dump";
   }
+
+  @Override
+  public Category getCategory() {
+    return Category.ADMIN;
+  }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/admin/ZookeeperInfoHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/ZookeeperInfoHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/ZookeeperInfoHandler.java
index e2ce63d..0616ac8 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/ZookeeperInfoHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/ZookeeperInfoHandler.java
@@ -97,6 +97,11 @@ public final class ZookeeperInfoHandler extends RequestHandlerBase {
     return "Fetch Zookeeper contents";
   }
 
+  @Override
+  public Category getCategory() {
+    return Category.ADMIN;
+  }
+
   /**
    * Enumeration of ways to filter collections on the graph panel.
    */

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/component/DebugComponent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/component/DebugComponent.java b/solr/core/src/java/org/apache/solr/handler/component/DebugComponent.java
index 42d21e0..be21733 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/DebugComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/DebugComponent.java
@@ -389,6 +389,11 @@ public class DebugComponent extends SearchComponent
   }
 
   @Override
+  public Category getCategory() {
+    return Category.OTHER;
+  }
+
+  @Override
   public URL[] getDocs() {
     return null;
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/component/ExpandComponent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/component/ExpandComponent.java b/solr/core/src/java/org/apache/solr/handler/component/ExpandComponent.java
index a5cbee2..c06aab0 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/ExpandComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/ExpandComponent.java
@@ -746,6 +746,11 @@ public class ExpandComponent extends SearchComponent implements PluginInfoInitia
   }
 
   @Override
+  public Category getCategory() {
+    return Category.QUERY;
+  }
+
+  @Override
   public URL[] getDocs() {
     try {
       return new URL[]{

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java b/solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java
index 90608c0..1cc05ab 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java
@@ -1213,6 +1213,11 @@ public class FacetComponent extends SearchComponent {
   }
 
   @Override
+  public Category getCategory() {
+    return Category.QUERY;
+  }
+
+  @Override
   public URL[] getDocs() {
     return null;
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/component/HighlightComponent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/component/HighlightComponent.java b/solr/core/src/java/org/apache/solr/handler/component/HighlightComponent.java
index 00ed4ef..d147be2 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/HighlightComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/HighlightComponent.java
@@ -273,6 +273,11 @@ public class HighlightComponent extends SearchComponent implements PluginInfoIni
   public String getDescription() {
     return "Highlighting";
   }
+
+  @Override
+  public Category getCategory() {
+    return Category.HIGHLIGHTER;
+  }
   
   @Override
   public URL[] getDocs() {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java b/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java
index be6e763..87d5c3d 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java
@@ -377,7 +377,7 @@ public class HttpShardHandlerFactory extends ShardHandlerFactory implements org.
 
   @Override
   public void initializeMetrics(SolrMetricManager manager, String registry, String scope) {
-    String expandedScope = SolrMetricManager.mkName(scope, SolrInfoMBean.Category.HTTP.name());
+    String expandedScope = SolrMetricManager.mkName(scope, SolrInfoMBean.Category.QUERY.name());
     clientConnectionManager.initializeMetrics(manager, registry, expandedScope);
     httpRequestExecutor.initializeMetrics(manager, registry, expandedScope);
     commExecutor = MetricUtils.instrumentedExecutorService(commExecutor,

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/component/MoreLikeThisComponent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/component/MoreLikeThisComponent.java b/solr/core/src/java/org/apache/solr/handler/component/MoreLikeThisComponent.java
index 7cf6d39..893cdf3 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/MoreLikeThisComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/MoreLikeThisComponent.java
@@ -409,7 +409,12 @@ public class MoreLikeThisComponent extends SearchComponent {
   public String getDescription() {
     return "More Like This";
   }
-  
+
+  @Override
+  public Category getCategory() {
+    return Category.QUERY;
+  }
+
   @Override
   public URL[] getDocs() {
     return null;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
index 9bd5efb..88ff731 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
@@ -1370,6 +1370,11 @@ public class QueryComponent extends SearchComponent
   }
 
   @Override
+  public Category getCategory() {
+    return Category.QUERY;
+  }
+
+  @Override
   public URL[] getDocs() {
     return null;
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java b/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
index 39e5b8a..8ce7301 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
@@ -599,6 +599,11 @@ public class RealTimeGetComponent extends SearchComponent
   }
 
   @Override
+  public Category getCategory() {
+    return Category.QUERY;
+  }
+
+  @Override
   public URL[] getDocs() {
     return null;
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/component/SpellCheckComponent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/component/SpellCheckComponent.java b/solr/core/src/java/org/apache/solr/handler/component/SpellCheckComponent.java
index 4966237..a229a85 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/SpellCheckComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/SpellCheckComponent.java
@@ -862,4 +862,9 @@ public class SpellCheckComponent extends SearchComponent implements SolrCoreAwar
   public String getDescription() {
     return "A Spell Checker component";
   }
+
+  @Override
+  public Category getCategory() {
+    return Category.SPELLCHECKER;
+  }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/component/TermVectorComponent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/component/TermVectorComponent.java b/solr/core/src/java/org/apache/solr/handler/component/TermVectorComponent.java
index 60ceca0..c887277 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/TermVectorComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/TermVectorComponent.java
@@ -481,6 +481,11 @@ public class TermVectorComponent extends SearchComponent implements SolrCoreAwar
   public String getDescription() {
     return "A Component for working with Term Vectors";
   }
+
+  @Override
+  public Category getCategory() {
+    return Category.QUERY;
+  }
 }
 
 class FieldOptions {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/handler/component/TermsComponent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/component/TermsComponent.java b/solr/core/src/java/org/apache/solr/handler/component/TermsComponent.java
index 918efa0..b76537a 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/TermsComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/TermsComponent.java
@@ -584,4 +584,9 @@ public class TermsComponent extends SearchComponent {
   public String getDescription() {
     return "A Component for working with Term Enumerators";
   }
+
+  @Override
+  public Category getCategory() {
+    return Category.QUERY;
+  }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/highlight/HighlightingPluginBase.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/highlight/HighlightingPluginBase.java b/solr/core/src/java/org/apache/solr/highlight/HighlightingPluginBase.java
index c03a961..f60ada8 100644
--- a/solr/core/src/java/org/apache/solr/highlight/HighlightingPluginBase.java
+++ b/solr/core/src/java/org/apache/solr/highlight/HighlightingPluginBase.java
@@ -61,7 +61,7 @@ public abstract class HighlightingPluginBase implements SolrInfoMBean
   @Override
   public Category getCategory()
   {
-    return Category.HIGHLIGHTING;
+    return Category.HIGHLIGHTER;
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/metrics/SolrCoreMetricManager.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/metrics/SolrCoreMetricManager.java b/solr/core/src/java/org/apache/solr/metrics/SolrCoreMetricManager.java
index e7ca9c4..3bebcd3 100644
--- a/solr/core/src/java/org/apache/solr/metrics/SolrCoreMetricManager.java
+++ b/solr/core/src/java/org/apache/solr/metrics/SolrCoreMetricManager.java
@@ -127,8 +127,7 @@ public class SolrCoreMetricManager implements Closeable {
     return registryName;
   }
 
-  /* package visibility for tests. */
-  String createRegistryName(String collectionName, String coreName) {
+  public static String createRegistryName(String collectionName, String coreName) {
     if (collectionName == null || (collectionName != null && !coreName.startsWith(collectionName + "_"))) {
       // single core, or unknown naming scheme
       return SolrMetricManager.getRegistryName(SolrInfoMBean.Group.core, coreName);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/metrics/reporters/JmxObjectNameFactory.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/metrics/reporters/JmxObjectNameFactory.java b/solr/core/src/java/org/apache/solr/metrics/reporters/JmxObjectNameFactory.java
new file mode 100644
index 0000000..4df5257
--- /dev/null
+++ b/solr/core/src/java/org/apache/solr/metrics/reporters/JmxObjectNameFactory.java
@@ -0,0 +1,155 @@
+/*
+ * 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.solr.metrics.reporters;
+
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
+import java.util.Arrays;
+
+import com.codahale.metrics.ObjectNameFactory;
+import org.apache.solr.metrics.SolrMetricInfo;
+
+/**
+ * Factory to create MBean names for a given metric.
+ */
+public class JmxObjectNameFactory implements ObjectNameFactory {
+
+  private final String domain;
+  private final String[] subdomains;
+  private final String reporterName;
+  private final String[] props;
+
+  /**
+   * Create ObjectName factory.
+   * @param reporterName name of the reporter
+   * @param domain JMX domain name
+   * @param additionalProperties additional properties as key, value pairs.
+   */
+  public JmxObjectNameFactory(String reporterName, String domain, String... additionalProperties) {
+    this.reporterName = reporterName;
+    this.domain = domain;
+    this.subdomains = domain.split("\\.");
+    if (additionalProperties != null && (additionalProperties.length % 2) != 0) {
+      throw new IllegalArgumentException("additionalProperties length must be even: " + Arrays.toString(additionalProperties));
+    }
+    this.props = additionalProperties;
+  }
+
+  /**
+   * Create a hierarchical name.
+   *
+   * @param type    metric class, eg. "counters", may be null for non-metric MBeans
+   * @param currentDomain  JMX domain
+   * @param name    object name
+   */
+  @Override
+  public ObjectName createName(String type, String currentDomain, String name) {
+    SolrMetricInfo metricInfo = SolrMetricInfo.of(name);
+
+    // It turns out that ObjectName(String) mostly preserves key ordering
+    // as specified in the constructor (except for the 'type' key that ends
+    // up at top level) - unlike ObjectName(String, Map) constructor
+    // that seems to have a mind of its own...
+    StringBuilder sb = new StringBuilder();
+    if (domain.equals(currentDomain)) {
+      if (subdomains != null && subdomains.length > 1) {
+        // use only first segment as domain
+        sb.append(subdomains[0]);
+        sb.append(':');
+        // use remaining segments as properties
+        for (int i = 1; i < subdomains.length; i++) {
+          if (i > 1) {
+            sb.append(',');
+          }
+          sb.append("dom");
+          sb.append(String.valueOf(i));
+          sb.append('=');
+          sb.append(subdomains[i]);
+        }
+        sb.append(','); // separate from other properties
+      } else {
+        sb.append(currentDomain);
+        sb.append(':');
+      }
+    } else {
+      sb.append(currentDomain);
+      sb.append(':');
+    }
+    sb.append("reporter=");
+    sb.append(reporterName);
+    sb.append(',');
+    if (metricInfo != null) {
+      sb.append("category=");
+      sb.append(metricInfo.category.toString());
+      sb.append(",scope=");
+      sb.append(metricInfo.scope);
+      // we could also split by type, but don't call it 'type' :)
+      // if (type != null) {
+      //   sb.append(",class=");
+      //   sb.append(type);
+      // }
+      sb.append(",name=");
+      sb.append(metricInfo.name);
+    } else {
+      // make dotted names into hierarchies
+      String[] path = name.split("\\.");
+      for (int i = 0; i < path.length - 1; i++) {
+        if (i > 0) {
+          sb.append(',');
+        }
+        sb.append("name"); sb.append(String.valueOf(i));
+        sb.append('=');
+        sb.append(path[i]);
+      }
+      if (path.length > 1) {
+        sb.append(',');
+      }
+      // split by type
+      // if (type != null) {
+      //   sb.append("class=");
+      //   sb.append(type);
+      // }
+      sb.append("name=");
+      sb.append(path[path.length - 1]);
+    }
+    if (props != null && props.length > 0) {
+      for (int i = 0; i < props.length; i += 2) {
+        if (props[i] == null || props[i].isEmpty()) {
+          continue;
+        }
+        if (props[i + 1] == null || props[i + 1].isEmpty()) {
+          continue;
+        }
+        sb.append(',');
+        sb.append(props[i]);
+        sb.append('=');
+        sb.append(props[i + 1]);
+      }
+    }
+
+    ObjectName objectName;
+
+    try {
+      objectName = new ObjectName(sb.toString());
+    } catch (MalformedObjectNameException e) {
+      throw new RuntimeException(sb.toString(), e);
+    }
+
+    return objectName;
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/metrics/reporters/SolrJmxReporter.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/metrics/reporters/SolrJmxReporter.java b/solr/core/src/java/org/apache/solr/metrics/reporters/SolrJmxReporter.java
index 47fbf11..0e78eee 100644
--- a/solr/core/src/java/org/apache/solr/metrics/reporters/SolrJmxReporter.java
+++ b/solr/core/src/java/org/apache/solr/metrics/reporters/SolrJmxReporter.java
@@ -17,8 +17,6 @@
 package org.apache.solr.metrics.reporters;
 
 import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
 
 import java.io.IOException;
 import java.lang.invoke.MethodHandles;
@@ -26,9 +24,7 @@ import java.lang.management.ManagementFactory;
 import java.util.Locale;
 
 import com.codahale.metrics.JmxReporter;
-import com.codahale.metrics.ObjectNameFactory;
 import org.apache.solr.core.PluginInfo;
-import org.apache.solr.metrics.SolrMetricInfo;
 import org.apache.solr.metrics.SolrMetricManager;
 import org.apache.solr.metrics.SolrMetricReporter;
 import org.apache.solr.util.JmxUtil;
@@ -180,105 +176,4 @@ public class SolrJmxReporter extends SolrMetricReporter {
         getClass().getName(), Integer.toHexString(hashCode()), domain, serviceUrl, agentId);
   }
 
-  /**
-   * Factory to create MBean names for a given metric.
-   */
-  private static class JmxObjectNameFactory implements ObjectNameFactory {
-
-    private final String domain;
-    private final String[] subdomains;
-    private final String reporterName;
-
-    JmxObjectNameFactory(String reporterName, String domain) {
-      this.reporterName = reporterName;
-      this.domain = domain;
-      this.subdomains = domain.split("\\.");
-    }
-
-    /**
-     * Create a hierarchical name of a metric.
-     *
-     * @param type    metric class, eg. "counters"
-     * @param currentDomain  JMX domain
-     * @param name    metric name
-     */
-    @Override
-    public ObjectName createName(String type, String currentDomain, String name) {
-      SolrMetricInfo metricInfo = SolrMetricInfo.of(name);
-
-      // It turns out that ObjectName(String) mostly preserves key ordering
-      // as specified in the constructor (except for the 'type' key that ends
-      // up at top level) - unlike ObjectName(String, Map) constructor
-      // that seems to have a mind of its own...
-      StringBuilder sb = new StringBuilder();
-      if (domain.equals(currentDomain)) {
-        if (subdomains != null && subdomains.length > 1) {
-          // use only first segment as domain
-          sb.append(subdomains[0]);
-          sb.append(':');
-          // use remaining segments as properties
-          for (int i = 1; i < subdomains.length; i++) {
-            if (i > 1) {
-              sb.append(',');
-            }
-            sb.append("dom");
-            sb.append(String.valueOf(i));
-            sb.append('=');
-            sb.append(subdomains[i]);
-          }
-          sb.append(','); // separate from other properties
-        } else {
-          sb.append(currentDomain);
-          sb.append(':');
-        }
-      } else {
-        sb.append(currentDomain);
-        sb.append(':');
-      }
-      sb.append("reporter=");
-      sb.append(reporterName);
-      sb.append(',');
-      if (metricInfo != null) {
-        sb.append("category=");
-        sb.append(metricInfo.category.toString());
-        sb.append(",scope=");
-        sb.append(metricInfo.scope);
-        // we could also split by type, but don't call it 'type' :)
-        // sb.append(",class=");
-        //sb.append(type);
-        sb.append(",name=");
-        sb.append(metricInfo.name);
-      } else {
-        // make dotted names into hierarchies
-        String[] path = name.split("\\.");
-        for (int i = 0; i < path.length - 1; i++) {
-          if (i > 0) {
-            sb.append(',');
-          }
-          sb.append("name"); sb.append(String.valueOf(i));
-          sb.append('=');
-          sb.append(path[i]);
-        }
-        if (path.length > 1) {
-          sb.append(',');
-        }
-        // split by type
-        // sb.append("class=");
-        // sb.append(type);
-        sb.append("name=");
-        sb.append(path[path.length - 1]);
-      }
-
-      ObjectName objectName;
-
-      try {
-        objectName = new ObjectName(sb.toString());
-      } catch (MalformedObjectNameException e) {
-        throw new RuntimeException(sb.toString(), e);
-      }
-
-      return objectName;
-    }
-  }
-
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/search/facet/FacetModule.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/facet/FacetModule.java b/solr/core/src/java/org/apache/solr/search/facet/FacetModule.java
index f8d677a..87aaa8f 100644
--- a/solr/core/src/java/org/apache/solr/search/facet/FacetModule.java
+++ b/solr/core/src/java/org/apache/solr/search/facet/FacetModule.java
@@ -292,6 +292,11 @@ public class FacetModule extends SearchComponent {
   }
 
   @Override
+  public Category getCategory() {
+    return Category.QUERY;
+  }
+
+  @Override
   public String getSource() {
     return null;
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/security/PKIAuthenticationPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/security/PKIAuthenticationPlugin.java b/solr/core/src/java/org/apache/solr/security/PKIAuthenticationPlugin.java
index 9de9e42..fdd4408 100644
--- a/solr/core/src/java/org/apache/solr/security/PKIAuthenticationPlugin.java
+++ b/solr/core/src/java/org/apache/solr/security/PKIAuthenticationPlugin.java
@@ -235,6 +235,12 @@ public class PKIAuthenticationPlugin extends AuthenticationPlugin implements Htt
       public String getDescription() {
         return "Return the public key of this server";
       }
+
+      @Override
+      public Category getCategory() {
+        return Category.ADMIN;
+      }
+
     };
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java b/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java
index 73731ad..035ae8d 100644
--- a/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java
+++ b/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java
@@ -850,11 +850,6 @@ public class DirectUpdateHandler2 extends UpdateHandler implements SolrCoreState
   }
 
   @Override
-  public Category getCategory() {
-    return Category.UPDATEHANDLER;
-  }
-
-  @Override
   public String getSource() {
     return null;
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/update/UpdateHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/UpdateHandler.java b/solr/core/src/java/org/apache/solr/update/UpdateHandler.java
index f52e353..1cf8a3f 100644
--- a/solr/core/src/java/org/apache/solr/update/UpdateHandler.java
+++ b/solr/core/src/java/org/apache/solr/update/UpdateHandler.java
@@ -200,4 +200,9 @@ public abstract class UpdateHandler implements SolrInfoMBean {
   }
 
   public abstract void split(SplitIndexCommand cmd) throws IOException;
+
+  @Override
+  public Category getCategory() {
+    return Category.UPDATE;
+  }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/update/UpdateLog.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/UpdateLog.java b/solr/core/src/java/org/apache/solr/update/UpdateLog.java
index 626dcd6..7c2dae6 100644
--- a/solr/core/src/java/org/apache/solr/update/UpdateLog.java
+++ b/solr/core/src/java/org/apache/solr/update/UpdateLog.java
@@ -103,7 +103,20 @@ public class UpdateLog implements PluginInfoInitialized, SolrMetricProducer {
       }
     }
   }
-  public enum State { REPLAYING, BUFFERING, APPLYING_BUFFERED, ACTIVE }
+
+  // NOTE: when adding new states make sure to keep existing numbers, because external metrics
+  // monitoring may depend on these values being stable.
+  public enum State { REPLAYING(0), BUFFERING(1), APPLYING_BUFFERED(2), ACTIVE(3);
+    private final int value;
+
+    State(final int value) {
+      this.value = value;
+    }
+
+    public int getValue() {
+      return value;
+    }
+  }
 
   public static final int ADD = 0x01;
   public static final int DELETE = 0x02;
@@ -365,19 +378,14 @@ public class UpdateLog implements PluginInfoInitialized, SolrMetricProducer {
       }
     };
     replayLogsCountGauge = () -> logs.size();
-    replayBytesGauge = () -> {
-      if (state == State.REPLAYING) {
-        return getTotalLogsSize();
-      } else {
-        return 0L;
-      }
-    };
+    replayBytesGauge = () -> getTotalLogsSize();
+
     manager.register(registry, bufferedOpsGauge, true, "ops", scope, "buffered");
     manager.register(registry, replayLogsCountGauge, true, "logs", scope, "replay", "remaining");
     manager.register(registry, replayBytesGauge, true, "bytes", scope, "replay", "remaining");
-    applyingBufferedOpsMeter = manager.meter(registry, "ops", scope, "applying_buffered");
+    applyingBufferedOpsMeter = manager.meter(registry, "ops", scope, "applyingBuffered");
     replayOpsMeter = manager.meter(registry, "ops", scope, "replay");
-    stateGauge = () -> state.ordinal();
+    stateGauge = () -> state.getValue();
     manager.register(registry, stateGauge, true, "state", scope);
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java b/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java
index 67447a3..5affae6 100644
--- a/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java
+++ b/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java
@@ -128,7 +128,7 @@ public class UpdateShardHandler implements SolrMetricProducer, SolrInfoMBean {
 
   @Override
   public Category getCategory() {
-    return Category.HTTP;
+    return Category.UPDATE;
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/test-files/solr/solr-gangliareporter.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/solr-gangliareporter.xml b/solr/core/src/test-files/solr/solr-gangliareporter.xml
index 9e7233c..4327388 100644
--- a/solr/core/src/test-files/solr/solr-gangliareporter.xml
+++ b/solr/core/src/test-files/solr/solr-gangliareporter.xml
@@ -24,7 +24,7 @@
     <!-- for unit tests this is set to 1 second - DO NOT USE THIS VALUE IN PRODUCTION! -->
     <int name="period">1</int>
     <str name="prefix">test</str>
-    <str name="filter">cores</str>
+    <str name="filter">CONTAINER.cores</str>
     <!-- this is only used when unit testing - DO NOT USE otherwise! -->
     <bool name="testing">true</bool>
   </reporter>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/test-files/solr/solr-graphitereporter.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/solr-graphitereporter.xml b/solr/core/src/test-files/solr/solr-graphitereporter.xml
index a0557df..7c7f5ca 100644
--- a/solr/core/src/test-files/solr/solr-graphitereporter.xml
+++ b/solr/core/src/test-files/solr/solr-graphitereporter.xml
@@ -24,7 +24,7 @@
     <!-- for unit tests this is set to 1 second - DO NOT USE THIS VALUE IN PRODUCTION! -->
     <int name="period">1</int>
     <str name="prefix">test</str>
-    <str name="filter">cores</str>
+    <str name="filter">CONTAINER.cores</str>
     <bool name="pickled">false</bool>
   </reporter>
  </metrics>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/test-files/solr/solr-slf4jreporter.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/solr-slf4jreporter.xml b/solr/core/src/test-files/solr/solr-slf4jreporter.xml
index 1a08416..f3144ca 100644
--- a/solr/core/src/test-files/solr/solr-slf4jreporter.xml
+++ b/solr/core/src/test-files/solr/solr-slf4jreporter.xml
@@ -22,13 +22,13 @@
     <!-- for unit tests this is set to 1 second - DO NOT USE THIS VALUE IN PRODUCTION! -->
     <int name="period">1</int>
     <str name="prefix">test</str>
-    <str name="filter">cores</str>
+    <str name="filter">CONTAINER.cores</str>
   </reporter>
   <reporter name="test2" group="node" class="org.apache.solr.metrics.reporters.SolrSlf4jReporter">
     <!-- for unit tests this is set to 1 second - DO NOT USE THIS VALUE IN PRODUCTION! -->
     <int name="period">1</int>
     <str name="prefix">test</str>
-    <str name="filter">cores</str>
+    <str name="filter">CONTAINER.cores</str>
     <str name="logger">foobar</str>
   </reporter>
  </metrics>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
index 906116e..25c483b 100644
--- a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
@@ -754,7 +754,7 @@ public class BasicDistributedZkTest extends AbstractFullDistribZkTestBase {
       QueryRequest req = new QueryRequest(params);
       NamedList<Object> resp = client.request(req);
       NamedList mbeans = (NamedList) resp.get("solr-mbeans");
-      NamedList uhandlerCat = (NamedList) mbeans.get("UPDATEHANDLER");
+      NamedList uhandlerCat = (NamedList) mbeans.get("UPDATE");
       NamedList uhandler = (NamedList) uhandlerCat.get("updateHandler");
       NamedList stats = (NamedList) uhandler.get("stats");
       return (Long) stats.get("commits");

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/test/org/apache/solr/handler/admin/MBeansHandlerTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/MBeansHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/admin/MBeansHandlerTest.java
index 7169888..21634b7 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/MBeansHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/MBeansHandlerTest.java
@@ -56,7 +56,7 @@ public class MBeansHandlerTest extends SolrTestCaseJ4 {
     NamedList<NamedList<NamedList<Object>>> diff = SolrInfoMBeanHandler.fromXML(xml);
 
     // The stats bean for SolrInfoMBeanHandler
-    NamedList stats = (NamedList)diff.get("QUERYHANDLER").get("/admin/mbeans").get("stats");
+    NamedList stats = (NamedList)diff.get("ADMIN").get("/admin/mbeans").get("stats");
     
     //System.out.println("stats:"+stats);
     assertEquals("Was: 1, Now: 2, Delta: 1", stats.get("requests"));
@@ -67,7 +67,7 @@ public class MBeansHandlerTest extends SolrTestCaseJ4 {
         "key","org.apache.solr.handler.admin.CollectionsHandler"
     ));
     NamedList<NamedList<NamedList<Object>>> nl = SolrInfoMBeanHandler.fromXML(xml);
-    assertNotNull( nl.get("QUERYHANDLER").get("org.apache.solr.handler.admin.CollectionsHandler"));
+    assertNotNull( nl.get("ADMIN").get("org.apache.solr.handler.admin.CollectionsHandler"));
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/test/org/apache/solr/handler/admin/MetricsHandlerTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/MetricsHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/admin/MetricsHandlerTest.java
index a3e724a..edab3ce 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/MetricsHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/MetricsHandlerTest.java
@@ -51,10 +51,10 @@ public class MetricsHandlerTest extends SolrTestCaseJ4 {
     assertNotNull(((NamedList) nl.get("SEARCHER.new.errors")).get("count"));
     assertEquals(0L, ((NamedList) nl.get("SEARCHER.new.errors")).get("count"));
     nl = (NamedList) values.get("solr.node");
-    assertNotNull(nl.get("cores.loaded")); // int gauge
-    assertEquals(1, ((NamedList) nl.get("cores.loaded")).get("value"));
-    assertNotNull(nl.get("QUERYHANDLER./admin/authorization.clientErrors")); // timer type
-    assertEquals(5, ((NamedList) nl.get("QUERYHANDLER./admin/authorization.clientErrors")).size());
+    assertNotNull(nl.get("CONTAINER.cores.loaded")); // int gauge
+    assertEquals(1, ((NamedList) nl.get("CONTAINER.cores.loaded")).get("value"));
+    assertNotNull(nl.get("ADMIN./admin/authorization.clientErrors")); // timer type
+    assertEquals(5, ((NamedList) nl.get("ADMIN./admin/authorization.clientErrors")).size());
 
     resp = new SolrQueryResponse();
     handler.handleRequestBody(req(CommonParams.QT, "/admin/metrics", CommonParams.WT, "json", "group", "jvm,jetty"), resp);
@@ -91,10 +91,10 @@ public class MetricsHandlerTest extends SolrTestCaseJ4 {
     assertEquals(1, values.size());
     values = (NamedList) values.get("solr.node");
     assertNotNull(values);
-    assertNull(values.get("QUERYHANDLER./admin/authorization.errors")); // this is a timer node
+    assertNull(values.get("ADMIN./admin/authorization.errors")); // this is a timer node
 
     resp = new SolrQueryResponse();
-    handler.handleRequestBody(req(CommonParams.QT, "/admin/metrics", CommonParams.WT, "json", "prefix", "cores"), resp);
+    handler.handleRequestBody(req(CommonParams.QT, "/admin/metrics", CommonParams.WT, "json", "prefix", "CONTAINER.cores"), resp);
     values = resp.getValues();
     assertNotNull(values.get("metrics"));
     values = (NamedList) values.get("metrics");
@@ -105,10 +105,10 @@ public class MetricsHandlerTest extends SolrTestCaseJ4 {
     assertEquals(3, ((NamedList)values.get("solr.node")).size());
     assertNotNull(values.get("solr.node"));
     values = (NamedList) values.get("solr.node");
-    assertNotNull(values.get("cores.lazy")); // this is a gauge node
+    assertNotNull(values.get("CONTAINER.cores.lazy")); // this is a gauge node
 
     resp = new SolrQueryResponse();
-    handler.handleRequestBody(req(CommonParams.QT, "/admin/metrics", CommonParams.WT, "json", "group", "jvm", "prefix", "cores"), resp);
+    handler.handleRequestBody(req(CommonParams.QT, "/admin/metrics", CommonParams.WT, "json", "group", "jvm", "prefix", "CONTAINER.cores"), resp);
     values = resp.getValues();
     assertNotNull(values.get("metrics"));
     values = (NamedList) values.get("metrics");
@@ -117,7 +117,7 @@ public class MetricsHandlerTest extends SolrTestCaseJ4 {
     assertNull(values.get("solr.node"));
 
     resp = new SolrQueryResponse();
-    handler.handleRequestBody(req(CommonParams.QT, "/admin/metrics", CommonParams.WT, "json", "group", "node", "type", "timer", "prefix", "cores"), resp);
+    handler.handleRequestBody(req(CommonParams.QT, "/admin/metrics", CommonParams.WT, "json", "group", "node", "type", "timer", "prefix", "CONTAINER.cores"), resp);
     values = resp.getValues();
     assertNotNull(values.get("metrics"));
     values = (NamedList) values.get("metrics");

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java b/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java
index c6449ac..27c038b 100644
--- a/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java
@@ -51,7 +51,7 @@ public class SolrMetricsIntegrationTest extends SolrTestCaseJ4 {
   private static final String MULTIREGISTRY = "multiregistry";
   private static final String[] INITIAL_REPORTERS = {REPORTER_NAMES[0], REPORTER_NAMES[1], UNIVERSAL, SPECIFIC, MULTIGROUP, MULTIREGISTRY};
   private static final String[] RENAMED_REPORTERS = {REPORTER_NAMES[0], REPORTER_NAMES[1], UNIVERSAL, MULTIGROUP};
-  private static final SolrInfoMBean.Category HANDLER_CATEGORY = SolrInfoMBean.Category.QUERYHANDLER;
+  private static final SolrInfoMBean.Category HANDLER_CATEGORY = SolrInfoMBean.Category.QUERY;
 
   private CoreContainer cc;
   private SolrMetricManager metricManager;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/test/org/apache/solr/metrics/reporters/SolrGangliaReporterTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/metrics/reporters/SolrGangliaReporterTest.java b/solr/core/src/test/org/apache/solr/metrics/reporters/SolrGangliaReporterTest.java
index d9675ef..c50ff3c 100644
--- a/solr/core/src/test/org/apache/solr/metrics/reporters/SolrGangliaReporterTest.java
+++ b/solr/core/src/test/org/apache/solr/metrics/reporters/SolrGangliaReporterTest.java
@@ -75,7 +75,7 @@ public class SolrGangliaReporterTest extends SolrTestCaseJ4 {
     assertTrue(names.size() >= 3);
     String[] frozenNames = (String[])names.toArray(new String[names.size()]);
     for (String name : frozenNames) {
-      assertTrue(name, name.startsWith("test.solr.node.cores."));
+      assertTrue(name, name.startsWith("test.solr.node.CONTAINER.cores."));
     }
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/test/org/apache/solr/metrics/reporters/SolrGraphiteReporterTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/metrics/reporters/SolrGraphiteReporterTest.java b/solr/core/src/test/org/apache/solr/metrics/reporters/SolrGraphiteReporterTest.java
index 3d1c482..e58c9dd 100644
--- a/solr/core/src/test/org/apache/solr/metrics/reporters/SolrGraphiteReporterTest.java
+++ b/solr/core/src/test/org/apache/solr/metrics/reporters/SolrGraphiteReporterTest.java
@@ -71,7 +71,7 @@ public class SolrGraphiteReporterTest extends SolrTestCaseJ4 {
       assertTrue(mock.lines.size() >= 3);
       String[] frozenLines = (String[])mock.lines.toArray(new String[mock.lines.size()]);
       for (String line : frozenLines) {
-        assertTrue(line, line.startsWith("test.solr.node.cores."));
+        assertTrue(line, line.startsWith("test.solr.node.CONTAINER.cores."));
       }
     } finally {
       mock.close();

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/core/src/test/org/apache/solr/search/TestRecovery.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/search/TestRecovery.java b/solr/core/src/test/org/apache/solr/search/TestRecovery.java
index cc3ca47..15aed5d 100644
--- a/solr/core/src/test/org/apache/solr/search/TestRecovery.java
+++ b/solr/core/src/test/org/apache/solr/search/TestRecovery.java
@@ -366,7 +366,7 @@ public class TestRecovery extends SolrTestCaseJ4 {
       assertEquals(UpdateLog.State.BUFFERING.ordinal(), state.getValue().intValue());
       Gauge<Integer> bufferedOps = (Gauge<Integer>)metrics.get("TLOG.buffered.ops");
       int initialOps = bufferedOps.getValue();
-      Meter applyingBuffered = (Meter)metrics.get("TLOG.applying_buffered.ops");
+      Meter applyingBuffered = (Meter)metrics.get("TLOG.applyingBuffered.ops");
       long initialApplyingOps = applyingBuffered.getCount();
 
       // simulate updates from a leader

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c6c0774/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
index 541ffed..cbaaa1b 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
@@ -391,7 +391,7 @@ public class CloudSolrClientTest extends SolrCloudTestCase {
 
   private Long getNumRequests(String baseUrl, String collectionName) throws
       SolrServerException, IOException {
-    return getNumRequests(baseUrl, collectionName, "QUERYHANDLER", "standard", false);
+    return getNumRequests(baseUrl, collectionName, "QUERY", "standard", false);
   }
 
   private Long getNumRequests(String baseUrl, String collectionName, String category, String key, boolean returnNumErrors) throws
@@ -431,7 +431,7 @@ public class CloudSolrClientTest extends SolrCloudTestCase {
         for (String adminPath : adminPathToMbean.keySet()) {
           long errorsBefore = 0;
           for (JettySolrRunner runner : cluster.getJettySolrRunners()) {
-            Long numRequests = getNumRequests(runner.getBaseUrl().toString(), "foo", "QUERYHANDLER", adminPathToMbean.get(adminPath), true);
+            Long numRequests = getNumRequests(runner.getBaseUrl().toString(), "foo", "QUERY", adminPathToMbean.get(adminPath), true);
             errorsBefore += numRequests;
             log.info("Found {} requests to {} on {}", numRequests, adminPath, runner.getBaseUrl());
           }
@@ -448,7 +448,7 @@ public class CloudSolrClientTest extends SolrCloudTestCase {
           }
           long errorsAfter = 0;
           for (JettySolrRunner runner : cluster.getJettySolrRunners()) {
-            Long numRequests = getNumRequests(runner.getBaseUrl().toString(), "foo", "QUERYHANDLER", adminPathToMbean.get(adminPath), true);
+            Long numRequests = getNumRequests(runner.getBaseUrl().toString(), "foo", "QUERY", adminPathToMbean.get(adminPath), true);
             errorsAfter += numRequests;
             log.info("Found {} requests to {} on {}", numRequests, adminPath, runner.getBaseUrl());
           }


Mime
View raw message