Package org.alfresco.solr
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.CoreAdminHandlerAlfresco Solr administration endpoints provider. A customisation of the existing SolrCoreAdminHandlerwhich 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
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringALFRESCO_DEFAULTSprotected static org.slf4j.LoggerLOGGER-
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
-
-
Constructor Summary
Constructors Constructor Description AlfrescoCoreAdminHandler()AlfrescoCoreAdminHandler(org.apache.solr.core.CoreContainer coreContainer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.ConcurrentHashMap<java.lang.String,InformationServer>getInformationServers()SolrTrackerSchedulergetScheduler()TrackerRegistrygetTrackerRegistry()protected voidhandleCustomAction(org.apache.solr.request.SolrQueryRequest req, org.apache.solr.response.SolrQueryResponse rsp)protected org.apache.solr.common.util.NamedList<java.lang.Object>newCore(java.lang.String coreName, int numShards, org.alfresco.service.cmr.repository.StoreRef storeRef, java.lang.String templateName, int replicationFactor, int nodeInstance, int numNodes, java.lang.String shardIds, java.util.Properties extraProperties)voidshutdown()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
-
-
-
-
Field Detail
-
LOGGER
protected static final org.slf4j.Logger LOGGER
-
ALFRESCO_DEFAULTS
public static final java.lang.String ALFRESCO_DEFAULTS
- See Also:
- Constant Field Values
-
-
Method Detail
-
shutdown
public void shutdown()
Shut down services that exist outside of the core.- Overrides:
shutdownin classorg.apache.solr.handler.admin.CoreAdminHandler
-
handleCustomAction
protected void handleCustomAction(org.apache.solr.request.SolrQueryRequest req, org.apache.solr.response.SolrQueryResponse rsp)- Overrides:
handleCustomActionin classorg.apache.solr.handler.admin.CoreAdminHandler
-
newCore
protected org.apache.solr.common.util.NamedList<java.lang.Object> newCore(java.lang.String coreName, int numShards, org.alfresco.service.cmr.repository.StoreRef storeRef, java.lang.String templateName, int replicationFactor, int nodeInstance, int numNodes, java.lang.String shardIds, java.util.Properties extraProperties)
-
getInformationServers
public java.util.concurrent.ConcurrentHashMap<java.lang.String,InformationServer> getInformationServers()
-
getTrackerRegistry
public TrackerRegistry getTrackerRegistry()
-
getScheduler
public SolrTrackerScheduler getScheduler()
-
-