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

This commit is contained in:
Christine Poerschke 2017-02-22 11:19:56 +00:00
parent 365a7ac0db
commit ee55bec9f0
4 changed files with 7 additions and 4 deletions

View File

@ -226,6 +226,9 @@ Other Changes
* SOLR-9966: Convert/migrate tests using EasyMock to Mockito (Cao Manh Dat, Uwe Schindler)
* SOLR-10173: Make HttpShardHandlerFactory.getReplicaListTransformer more extensible.
(Ramsey Haddad via Christine Poerschke)
================== 6.4.2 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

View File

@ -103,7 +103,7 @@ public class HttpShardHandlerFactory extends ShardHandlerFactory implements org.
private HttpClientMetricNameStrategy metricNameStrategy;
private final Random r = new Random();
protected final Random r = new Random();
private final ReplicaListTransformer shufflingReplicaListTransformer = new ShufflingReplicaListTransformer(r);
@ -318,7 +318,7 @@ public class HttpShardHandlerFactory extends ShardHandlerFactory implements org.
return s != null && s.startsWith(preferredHostAddress);
}
}
ReplicaListTransformer getReplicaListTransformer(final SolrQueryRequest req)
protected ReplicaListTransformer getReplicaListTransformer(final SolrQueryRequest req)
{
final SolrParams params = req.getParams();

View File

@ -21,7 +21,7 @@ import java.util.List;
import org.apache.solr.common.cloud.Replica;
import org.apache.solr.common.params.ShardParams;
interface ReplicaListTransformer {
public interface ReplicaListTransformer {
/**
* Transforms the passed in list of choices. Transformations can include (but are not limited to)

View File

@ -94,7 +94,7 @@ public class ReplicaListTransformerTest extends LuceneTestCase {
transformer = new HttpShardHandlerFactory() {
@Override
ReplicaListTransformer getReplicaListTransformer(final SolrQueryRequest req)
protected ReplicaListTransformer getReplicaListTransformer(final SolrQueryRequest req)
{
final SolrParams params = req.getParams();