Class 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 String ALFRESCO_DEFAULTS  
      protected static org.slf4j.Logger 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
    • Field Detail

      • LOGGER

        protected static final org.slf4j.Logger LOGGER
    • Constructor Detail

      • AlfrescoCoreAdminHandler

        public AlfrescoCoreAdminHandler()
      • AlfrescoCoreAdminHandler

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

      • 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)