Class AlfrescoCoreAdminHandler

java.lang.Object
org.apache.solr.handler.RequestHandlerBase
org.apache.solr.handler.admin.CoreAdminHandler
org.alfresco.solr.AlfrescoCoreAdminHandler
All Implemented Interfaces:
org.apache.solr.api.ApiSupport, org.apache.solr.core.SolrInfoMBean, org.apache.solr.handler.NestedRequestHandler, org.apache.solr.metrics.SolrMetricProducer, org.apache.solr.request.SolrRequestHandler, org.apache.solr.security.PermissionNameProvider

public class AlfrescoCoreAdminHandler extends org.apache.solr.handler.admin.CoreAdminHandler
Alfresco Solr administration endpoints provider. A customisation of the existing Solr CoreAdminHandler which offers additional administration endpoints. Since 1.5 the behaviour of these endpoints differs a bit depending on the target core. This because a lot of these endpoints rely on the information obtained from the trackers, and trackers (see SEARCH-1606) are disabled on slave cores. When a request arrives to this handler, the following are the possible scenarios:
  • a core is specified in the request: if the target core is a slave then a minimal response or an empty response with an informational message is returned. If instead the core is a master (or it is a standalone core) the service will return as much information as possible (as it happened before 1.5)
  • a core isn't specified in the request: the request is supposed to target all available cores. However, while looping, slave cores are filtered out. In case all cores are slave (i.e. we are running a "pure" slave node) the response will be empty, it will include an informational message in order to warn the requestor. Sometimes this informative behaviour is not feasible: in those cases an empty response will be returned.
Author:
Andrea Gazzarini
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.solr.handler.admin.CoreAdminHandler

    org.apache.solr.handler.admin.CoreAdminHandler.Invocable

    Nested classes/interfaces inherited from interface org.apache.solr.security.PermissionNameProvider

    org.apache.solr.security.PermissionNameProvider.Name

    Nested classes/interfaces inherited from interface org.apache.solr.core.SolrInfoMBean

    org.apache.solr.core.SolrInfoMBean.Category, org.apache.solr.core.SolrInfoMBean.Group
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    protected static final org.slf4j.Logger
     

    Fields inherited from class org.apache.solr.handler.admin.CoreAdminHandler

    COMPLETED, coreContainer, FAILED, MAX_TRACKED_REQUESTS, parallelExecutor, paramToProp, requestStatusMap, RESPONSE, RESPONSE_MESSAGE, RESPONSE_STATUS, RUNNING

    Fields inherited from class org.apache.solr.handler.RequestHandlerBase

    appends, defaults, httpCaching, initArgs, invariants

    Fields inherited from interface org.apache.solr.security.PermissionNameProvider

    ANY, NULL, values

    Fields inherited from interface org.apache.solr.request.SolrRequestHandler

    TYPE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    AlfrescoCoreAdminHandler(org.apache.solr.core.CoreContainer coreContainer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    protected void
    handleCustomAction(org.apache.solr.request.SolrQueryRequest req, org.apache.solr.response.SolrQueryResponse rsp)
     
    protected org.apache.solr.common.util.NamedList<Object>
    newCore(String coreName, int numShards, org.alfresco.service.cmr.repository.StoreRef storeRef, String templateName, int replicationFactor, int nodeInstance, int numNodes, String shardIds, Properties extraProperties)
     
    void
    Shut down services that exist outside of the core.

    Methods inherited from class org.apache.solr.handler.admin.CoreAdminHandler

    buildCoreParams, getApis, getCategory, getCoreContainer, getDescription, getPermissionName, handleRequestBody, init, initializeMetrics, normalizePath, params, registerV2

    Methods inherited from class org.apache.solr.handler.RequestHandlerBase

    getDocs, getInitArgs, getName, getPluginInfo, getRequestHandler, getSolrParamsFromNamedList, getSource, getStatistics, getSubHandler, getVersion, handleRequest, setPluginInfo

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.solr.api.ApiSupport

    registerV1
  • Field Details

    • LOGGER

      protected static final org.slf4j.Logger LOGGER
    • ALFRESCO_DEFAULTS

      public static final String ALFRESCO_DEFAULTS
      See Also:
  • Constructor Details

    • AlfrescoCoreAdminHandler

      public AlfrescoCoreAdminHandler()
    • AlfrescoCoreAdminHandler

      public AlfrescoCoreAdminHandler(org.apache.solr.core.CoreContainer coreContainer)
  • Method Details

    • shutdown

      public void shutdown()
      Shut down services that exist outside of the core.
      Overrides:
      shutdown in class org.apache.solr.handler.admin.CoreAdminHandler
    • handleCustomAction

      protected void handleCustomAction(org.apache.solr.request.SolrQueryRequest req, org.apache.solr.response.SolrQueryResponse rsp)
      Overrides:
      handleCustomAction in class org.apache.solr.handler.admin.CoreAdminHandler
    • newCore

      protected org.apache.solr.common.util.NamedList<Object> newCore(String coreName, int numShards, org.alfresco.service.cmr.repository.StoreRef storeRef, String templateName, int replicationFactor, int nodeInstance, int numNodes, String shardIds, Properties extraProperties)
    • getInformationServers

      public ConcurrentHashMap<String,InformationServer> getInformationServers()
    • getTrackerRegistry

      public TrackerRegistry getTrackerRegistry()
    • getScheduler

      public SolrTrackerScheduler getScheduler()