Class ParallelHttpShardHandler


@NotThreadSafe public class ParallelHttpShardHandler extends HttpShardHandler
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.

  • Constructor Details

  • Method Details

    • responsesPending

      protected boolean responsesPending()
      Overrides:
      responsesPending in class HttpShardHandler
    • 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 class HttpShardHandler
      Parameters:
      sreq - the request to make
      shard - the shard to address
      params - request parameters
      lbReq - the load balanced request
      ssr - the response collector part 1
      srsp - the shard response collector
      startTimeNS - the time at which the request was initiated, likely just prior to calling this method.
    • cancelAll

      public void cancelAll()
      Description copied from class: ShardHandler
      Cancels all uncompleted requests managed by this instance
      Overrides:
      cancelAll in class HttpShardHandler