Class HttpShardHandler
- java.lang.Object
-
- org.apache.solr.handler.component.ShardHandler
-
- org.apache.solr.handler.component.HttpShardHandler
-
@NotThreadSafe public class HttpShardHandler extends ShardHandler
-
-
Field Summary
Fields Modifier and Type Field Description static StringONLY_NRT_REPLICASIf the request context map has an entry with this key and Boolean.TRUE as value,prepDistributed(ResponseBuilder)will only includeReplica.Type.NRTreplicas as possible destination of the distributed request (or a leader replica of typeReplica.Type.TLOG).
-
Constructor Summary
Constructors Constructor Description HttpShardHandler(HttpShardHandlerFactory httpShardHandlerFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelAll()ShardHandlerFactorygetShardHandlerFactory()protected org.apache.solr.client.solrj.request.QueryRequestmakeQueryRequest(ShardRequest sreq, org.apache.solr.common.params.ModifiableSolrParams params, String shard)Subclasses could modify the request based on the shardvoidprepDistributed(ResponseBuilder rb)voidsubmit(ShardRequest sreq, String shard, org.apache.solr.common.params.ModifiableSolrParams params)ShardResponsetakeCompletedIncludingErrors()returns a ShardResponse of the last response correlated with a ShardRequest.ShardResponsetakeCompletedOrError()returns a ShardResponse of the last response correlated with a ShardRequest, or immediately returns a ShardResponse if there was an error detectedprotected ShardResponsetransfomResponse(ShardRequest sreq, ShardResponse rsp, String shard)Subclasses could modify the Response based on the shard
-
-
-
Field Detail
-
ONLY_NRT_REPLICAS
public static String ONLY_NRT_REPLICAS
If the request context map has an entry with this key and Boolean.TRUE as value,prepDistributed(ResponseBuilder)will only includeReplica.Type.NRTreplicas as possible destination of the distributed request (or a leader replica of typeReplica.Type.TLOG). This is used by the RealtimeGet handler, since other types of replicas shouldn't respond to RTG requests
-
-
Constructor Detail
-
HttpShardHandler
public HttpShardHandler(HttpShardHandlerFactory httpShardHandlerFactory)
-
-
Method Detail
-
submit
public void submit(ShardRequest sreq, String shard, org.apache.solr.common.params.ModifiableSolrParams params)
- Specified by:
submitin classShardHandler
-
makeQueryRequest
protected org.apache.solr.client.solrj.request.QueryRequest makeQueryRequest(ShardRequest sreq, org.apache.solr.common.params.ModifiableSolrParams params, String shard)
Subclasses could modify the request based on the shard
-
transfomResponse
protected ShardResponse transfomResponse(ShardRequest sreq, ShardResponse rsp, String shard)
Subclasses could modify the Response based on the shard
-
takeCompletedIncludingErrors
public ShardResponse takeCompletedIncludingErrors()
returns a ShardResponse of the last response correlated with a ShardRequest. This won't return early if it runs into an error.- Specified by:
takeCompletedIncludingErrorsin classShardHandler
-
takeCompletedOrError
public ShardResponse takeCompletedOrError()
returns a ShardResponse of the last response correlated with a ShardRequest, or immediately returns a ShardResponse if there was an error detected- Specified by:
takeCompletedOrErrorin classShardHandler
-
cancelAll
public void cancelAll()
- Specified by:
cancelAllin classShardHandler
-
prepDistributed
public void prepDistributed(ResponseBuilder rb)
- Specified by:
prepDistributedin classShardHandler
-
getShardHandlerFactory
public ShardHandlerFactory getShardHandlerFactory()
- Specified by:
getShardHandlerFactoryin classShardHandler
-
-