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 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.NRT
replicas 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 void
cancelAll()
ShardHandlerFactory
getShardHandlerFactory()
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 shardvoid
prepDistributed(ResponseBuilder rb)
void
submit(ShardRequest sreq, String shard, org.apache.solr.common.params.ModifiableSolrParams params)
ShardResponse
takeCompletedIncludingErrors()
returns a ShardResponse of the last response correlated with a ShardRequest.ShardResponse
takeCompletedOrError()
returns a ShardResponse of the last response correlated with a ShardRequest, or immediately returns a ShardResponse if there was an error detectedprotected ShardResponse
transfomResponse(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.NRT
replicas 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:
submit
in 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:
takeCompletedIncludingErrors
in 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:
takeCompletedOrError
in classShardHandler
-
cancelAll
public void cancelAll()
- Specified by:
cancelAll
in classShardHandler
-
prepDistributed
public void prepDistributed(ResponseBuilder rb)
- Specified by:
prepDistributed
in classShardHandler
-
getShardHandlerFactory
public ShardHandlerFactory getShardHandlerFactory()
- Specified by:
getShardHandlerFactory
in classShardHandler
-
-