Class 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.SolrCoreAware

    A Handler which provides a REST API for replication and serves replication requests from Slaves.

    When running on the master, it provides the following commands

    1. Get the current replicable index version (command=indexversion)
    2. Get the list of files for a given index version (command=filelist&indexversion=<VERSION>)
    3. 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.
    4. Get status/statistics (command=details)

    When running on the slave, it provides the following commands

    1. Perform an index fetch now (command=snappull)
    2. Get status/statistics (command=details)
    3. Abort an index fetch (command=abort)
    4. 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
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String PATH  
      static java.lang.String SIZE  
      • Fields inherited from class org.apache.solr.handler.RequestHandlerBase

        appends, defaults, httpCaching, initArgs, invariants
      • Fields inherited from interface org.apache.solr.request.SolrRequestHandler

        TYPE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.solr.core.SolrInfoMBean.Category getCategory()  
      java.lang.String getDescription()  
      org.apache.solr.common.util.NamedList getStatistics()  
      void handleRequestBody​(org.apache.solr.request.SolrQueryRequest req, org.apache.solr.response.SolrQueryResponse rsp)  
      void inform​(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
      • 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, registerV2
    • Constructor Detail

      • AlfrescoReplicationHandler

        public AlfrescoReplicationHandler()
    • Method Detail

      • handleRequestBody

        public void handleRequestBody​(org.apache.solr.request.SolrQueryRequest req,
                                      org.apache.solr.response.SolrQueryResponse rsp)
                               throws java.lang.Exception
        Specified by:
        handleRequestBody in class org.apache.solr.handler.RequestHandlerBase
        Throws:
        java.lang.Exception
      • getCategory

        public org.apache.solr.core.SolrInfoMBean.Category getCategory()
        Specified by:
        getCategory in interface org.apache.solr.core.SolrInfoMBean
        Overrides:
        getCategory in class org.apache.solr.handler.RequestHandlerBase
      • getDescription

        public java.lang.String getDescription()
        Specified by:
        getDescription in interface org.apache.solr.core.SolrInfoMBean
        Specified by:
        getDescription in class org.apache.solr.handler.RequestHandlerBase
      • getStatistics

        public org.apache.solr.common.util.NamedList getStatistics()
        Specified by:
        getStatistics in interface org.apache.solr.core.SolrInfoMBean
        Overrides:
        getStatistics in class org.apache.solr.handler.RequestHandlerBase
      • inform

        public void inform​(org.apache.solr.core.SolrCore core)
        Specified by:
        inform in interface org.apache.solr.util.plugin.SolrCoreAware