Class ParallelHttpShardHandler
java.lang.Object
org.apache.solr.handler.component.ShardHandler
org.apache.solr.handler.component.HttpShardHandler
org.apache.solr.handler.component.ParallelHttpShardHandler
A version of
HttpShardHandler optimized for massively-sharded collections.
Uses a HttpShardHandlerFactory.commExecutor thread for all work related to outgoing
requests, allowing HttpShardHandler.submit(ShardRequest, String, ModifiableSolrParams) to return more
quickly. (See HttpShardHandler 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
lbClient, ONLY_NRT_REPLICAS, responseFutureMap, responses -
Constructor Summary
ConstructorsConstructorDescriptionParallelHttpShardHandler(ParallelHttpShardHandlerFactory httpShardHandlerFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidCancels all uncompleted requests managed by this instanceprotected voidmakeShardRequest(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 booleanMethods inherited from class org.apache.solr.handler.component.HttpShardHandler
createQueryRequest, getShardHandlerFactory, getShardsTolerantAsBool, prepDistributed, recordShardSubmitError, submit, takeCompletedIncludingErrors, takeCompletedOrError, transformResponseMethods inherited from class org.apache.solr.handler.component.ShardHandler
setShardAttributesToParams
-
Constructor Details
-
ParallelHttpShardHandler
-
-
Method Details
-
responsesPending
protected boolean responsesPending()- Overrides:
responsesPendingin 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:HttpShardHandlerDo the actual work of sending a request to a shard and receiving the response- Overrides:
makeShardRequestin classHttpShardHandler- Parameters:
sreq- the request to makeshard- the shard to addressparams- request parameterslbReq- the load balanced requestssr- the response collector part 1srsp- the shard response collectorstartTimeNS- the time at which the request was initiated, likely just prior to calling this method.
-
cancelAll
public void cancelAll()Description copied from class:ShardHandlerCancels all uncompleted requests managed by this instance- Overrides:
cancelAllin classHttpShardHandler
-