Class ParallelHttpShardHandler
- java.lang.Object
-
- org.apache.solr.handler.component.ShardHandler
-
- org.apache.solr.handler.component.HttpShardHandler
-
- org.apache.solr.handler.component.ParallelHttpShardHandler
-
@NotThreadSafe public class ParallelHttpShardHandler extends HttpShardHandler
A version ofHttpShardHandler
optimized for massively-sharded collections.Uses a
HttpShardHandlerFactory.commExecutor
thread for all work related to outgoing requests, allowingHttpShardHandler.submit(ShardRequest, String, ModifiableSolrParams)
to return more quickly. (SeeHttpShardHandler
for comparison.)The additional focus on parallelization makes this an ideal implementation for collections with many shards.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.handler.component.HttpShardHandler
HttpShardHandler.SimpleSolrResponse
-
-
Field Summary
-
Fields inherited from class org.apache.solr.handler.component.HttpShardHandler
FUTURE_MAP_LOCK, lbClient, ONLY_NRT_REPLICAS, pending, responseFutureMap, responses
-
-
Constructor Summary
Constructors Constructor Description ParallelHttpShardHandler(ParallelHttpShardHandlerFactory httpShardHandlerFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
makeShardRequest(ShardRequest sreq, String shard, org.apache.solr.common.params.ModifiableSolrParams params, org.apache.solr.client.solrj.impl.LBSolrClient.Req lbReq, HttpShardHandler.SimpleSolrResponse ssr, ShardResponse srsp, long startTimeNS)
Do the actual work of sending a request to a shard and receiving the responseprotected boolean
responsesPending()
-
Methods inherited from class org.apache.solr.handler.component.HttpShardHandler
cancelAll, createQueryRequest, getShardHandlerFactory, getShardsTolerantAsBool, prepDistributed, submit, takeCompletedIncludingErrors, takeCompletedOrError, transformResponse
-
Methods inherited from class org.apache.solr.handler.component.ShardHandler
setShardAttributesToParams
-
-
-
-
Constructor Detail
-
ParallelHttpShardHandler
public ParallelHttpShardHandler(ParallelHttpShardHandlerFactory httpShardHandlerFactory)
-
-
Method Detail
-
responsesPending
protected boolean responsesPending()
- Overrides:
responsesPending
in classHttpShardHandler
-
makeShardRequest
protected void makeShardRequest(ShardRequest sreq, String shard, org.apache.solr.common.params.ModifiableSolrParams params, org.apache.solr.client.solrj.impl.LBSolrClient.Req lbReq, HttpShardHandler.SimpleSolrResponse ssr, ShardResponse srsp, long startTimeNS)
Description copied from class:HttpShardHandler
Do the actual work of sending a request to a shard and receiving the response- Overrides:
makeShardRequest
in classHttpShardHandler
- Parameters:
sreq
- the request to makeshard
- the shard to addressparams
- request parameterslbReq
- the load balanced request suitable for LBHttp2SolrClientssr
- the response collector part 1srsp
- the shard response collectorstartTimeNS
- the time at which the request was initiated, likely just prior to calling this method.
-
-