Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-10173

Enable extension/customization of HttpShardHandler by increasing visibility

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.5, 7.0
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None
    • Flags:
      Patch

      Description

      Increase visibility of 2 elements of HttpShardHandlerFactory from "private" to "protected" to facilitate extension of the class. Make ReplicaListTransformer "public" to enable implementation of the interface in custom classes.

      1. solr-10173.patch
        2 kB
        Ramsey Haddad
      2. SOLR-10173.patch
        3 kB
        Christine Poerschke

        Activity

        Hide
        cpoerschke Christine Poerschke added a comment -

        This will allow derived classes such as

        package com.mycompany.myteam.solr.handler.component;
        
        public class HttpShardHandlerFactory extends org.apache.solr.handler.component.HttpShardHandlerFactory {
          @Override
          protected ReplicaListTransformer getReplicaListTransformer(final SolrQueryRequest req) {
            if (...) {
              ... custom logic possibly using r(andomisation) ...
            } else {
              return super.getReplicaListTransformer(req);
            }
          }
        }
        

        Looks good to me.

        Show
        cpoerschke Christine Poerschke added a comment - This will allow derived classes such as package com.mycompany.myteam.solr.handler.component; public class HttpShardHandlerFactory extends org.apache.solr.handler.component.HttpShardHandlerFactory { @Override protected ReplicaListTransformer getReplicaListTransformer( final SolrQueryRequest req) { if (...) { ... custom logic possibly using r(andomisation) ... } else { return super .getReplicaListTransformer(req); } } } Looks good to me.
        Hide
        cpoerschke Christine Poerschke added a comment -

        ReplicaListTransformerTest.java change added to original patch to make 'ant precommit' pass.

        Show
        cpoerschke Christine Poerschke added a comment - ReplicaListTransformerTest.java change added to original patch to make 'ant precommit' pass.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit ee55bec9f0dc44661e77b6c65b05d1ab586a4cdc in lucene-solr's branch refs/heads/master from Christine Poerschke
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=ee55bec ]

        SOLR-10173: Make HttpShardHandlerFactory.getReplicaListTransformer more extensible. (Ramsey Haddad via Christine Poerschke)

        Show
        jira-bot ASF subversion and git services added a comment - Commit ee55bec9f0dc44661e77b6c65b05d1ab586a4cdc in lucene-solr's branch refs/heads/master from Christine Poerschke [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=ee55bec ] SOLR-10173 : Make HttpShardHandlerFactory.getReplicaListTransformer more extensible. (Ramsey Haddad via Christine Poerschke)
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 76e75099f980edc74166e04b1f72e286d0e11d79 in lucene-solr's branch refs/heads/branch_6x from Christine Poerschke
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=76e7509 ]

        SOLR-10173: Make HttpShardHandlerFactory.getReplicaListTransformer more extensible. (Ramsey Haddad via Christine Poerschke)

        Show
        jira-bot ASF subversion and git services added a comment - Commit 76e75099f980edc74166e04b1f72e286d0e11d79 in lucene-solr's branch refs/heads/branch_6x from Christine Poerschke [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=76e7509 ] SOLR-10173 : Make HttpShardHandlerFactory.getReplicaListTransformer more extensible. (Ramsey Haddad via Christine Poerschke)
        Hide
        cpoerschke Christine Poerschke added a comment -

        Thanks Ramsey!

        Show
        cpoerschke Christine Poerschke added a comment - Thanks Ramsey!

          People

          • Assignee:
            cpoerschke Christine Poerschke
            Reporter:
            rwhaddad Ramsey Haddad
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development