Solr
  1. Solr
  2. SOLR-2638

A CoreContainer Plugin interface to create Container level Services

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: multicore
    • Labels:
      None

      Description

      It can help register services such as Zookeeper .

      interface

      public abstract class ContainerPlugin {
        /**Called before initializing any core.
         * @param container
         * @param attrs
         */
        public abstract void init(CoreContainer container, Map<String,String> attrs);
      
        /**Callback after all cores are initialized
         */
        public void postInit(){}
      
        /**Callback after each core is created, but before registration
         * @param core
         */
        public void onCoreCreate(SolrCore core){}
      
        /**Callback for server shutdown
         */
        public void shutdown(){}
      
      }
      

      It may be specified in solr.xml as

      <solr>
      
        <plugin name="zk" class="solr.ZookeeperService" param1="val1" param2="val2" zkClientTimeout="8000"/>
      
        <cores adminPath="/admin/cores" defaultCoreName="collection1" host="127.0.0.1" hostPort="${hostPort:8983}" hostContext="solr" >
          <core name="collection1" shard="${shard:}" collection="${collection:collection1}" config="${solrconfig:solrconfig.xml}" instanceDir="."/>
        </cores>
      </solr>
      
      1. SOLR-2638.patch
        5 kB
        Noble Paul
      2. SOLR-2638.patch
        69 kB
        Noble Paul

        Activity

        Hide
        Noble Paul added a comment -

        First cut

        Show
        Noble Paul added a comment - First cut
        Hide
        Mark Miller added a comment -

        cool - would be nice to abstract some of this out of CoreContainer - could use some slimming.

        Show
        Mark Miller added a comment - cool - would be nice to abstract some of this out of CoreContainer - could use some slimming.
        Hide
        Noble Paul added a comment -

        I'm preparing a mega patch which abstracts out Zookeeper as a complete plugin. It also simplifies the configuration

        Show
        Noble Paul added a comment - I'm preparing a mega patch which abstracts out Zookeeper as a complete plugin. It also simplifies the configuration
        Hide
        Mark Miller added a comment -

        Anything to share yet Noble? I'd be happy to join on this one.

        Show
        Mark Miller added a comment - Anything to share yet Noble? I'd be happy to join on this one.
        Hide
        Noble Paul added a comment -

        A non-working patch. But it has most of the changes I wish to introduce. I was working on a pre-june-22 branch and I just ported it to trunk so that I can post a rough patch

        Show
        Noble Paul added a comment - A non-working patch. But it has most of the changes I wish to introduce. I was working on a pre-june-22 branch and I just ported it to trunk so that I can post a rough patch

          People

          • Assignee:
            Noble Paul
            Reporter:
            Noble Paul
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development