Package org.alfresco.solr.handler
Class AlfrescoReplicationHandler
- java.lang.Object
-
- org.apache.solr.handler.RequestHandlerBase
-
- org.alfresco.solr.handler.AlfrescoReplicationHandler
-
- 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.util.plugin.SolrCoreAware
public class AlfrescoReplicationHandler extends org.apache.solr.handler.RequestHandlerBase implements org.apache.solr.util.plugin.SolrCoreAwareA Handler which provides a REST API for replication and serves replication requests from Slaves.
When running on the master, it provides the following commands
- Get the current replicable index version (command=indexversion)
- Get the list of files for a given index version (command=filelist&indexversion=<VERSION>)
- Get full or a part (chunk) of a given index or a config file (command=filecontent&file=<FILE_NAME>) You can optionally specify an offset and length to get that chunk of the file. You can request a configuration file by using "cf" parameter instead of the "file" parameter.
- Get status/statistics (command=details)
When running on the slave, it provides the following commands
- Perform an index fetch now (command=snappull)
- Get status/statistics (command=details)
- Abort an index fetch (command=abort)
- Enable/Disable polling the master for new versions (command=enablepoll or command=disablepoll)
- Since:
- solr 1.4 This class has been modified in order to allow the alfresco contentstore to be efficiently replicated in a master slave environment.
- Author:
- Elia
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAlfrescoReplicationHandler.CommitVersionInfoprotected classAlfrescoReplicationHandler.ContentStoreFilesStreamThis is used to write files in content store.static classAlfrescoReplicationHandler.FileInfoprotected classAlfrescoReplicationHandler.LocalFsFileStreamThis is used to read and send files in content store ad a single stream
-
Constructor Summary
Constructors Constructor Description AlfrescoReplicationHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.solr.core.SolrInfoMBean.CategorygetCategory()StringgetDescription()org.apache.solr.common.util.NamedListgetStatistics()voidhandleRequestBody(org.apache.solr.request.SolrQueryRequest req, org.apache.solr.response.SolrQueryResponse rsp)voidinform(org.apache.solr.core.SolrCore core)-
Methods inherited from class org.apache.solr.handler.RequestHandlerBase
getApis, getDocs, getInitArgs, getName, getPluginInfo, getRequestHandler, getSolrParamsFromNamedList, getSource, getSubHandler, getVersion, handleRequest, init, initializeMetrics, setPluginInfo
-
-
-
-
Field Detail
-
PATH
public static final String PATH
- See Also:
- Constant Field Values
-
SIZE
public static final String SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
handleRequestBody
public void handleRequestBody(org.apache.solr.request.SolrQueryRequest req, org.apache.solr.response.SolrQueryResponse rsp) throws Exception- Specified by:
handleRequestBodyin classorg.apache.solr.handler.RequestHandlerBase- Throws:
Exception
-
getCategory
public org.apache.solr.core.SolrInfoMBean.Category getCategory()
- Specified by:
getCategoryin interfaceorg.apache.solr.core.SolrInfoMBean- Overrides:
getCategoryin classorg.apache.solr.handler.RequestHandlerBase
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceorg.apache.solr.core.SolrInfoMBean- Specified by:
getDescriptionin classorg.apache.solr.handler.RequestHandlerBase
-
getStatistics
public org.apache.solr.common.util.NamedList getStatistics()
- Specified by:
getStatisticsin interfaceorg.apache.solr.core.SolrInfoMBean- Overrides:
getStatisticsin classorg.apache.solr.handler.RequestHandlerBase
-
inform
public void inform(org.apache.solr.core.SolrCore core)
- Specified by:
informin interfaceorg.apache.solr.util.plugin.SolrCoreAware
-
-