public class TrackingShardHandlerFactory
extends org.apache.solr.handler.component.HttpShardHandlerFactory
This is a test helper only and should *not* be used for production.
Modifier and Type | Class and Description |
---|---|
static class |
TrackingShardHandlerFactory.RequestTrackingQueue
A queue having helper methods to select requests by shard and purpose.
|
static class |
TrackingShardHandlerFactory.ShardRequestAndParams |
Constructor and Description |
---|
TrackingShardHandlerFactory() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
org.apache.solr.handler.component.ShardHandler |
getShardHandler() |
org.apache.solr.handler.component.ShardHandler |
getShardHandler(org.apache.solr.client.solrj.impl.Http2SolrClient client) |
org.apache.solr.handler.component.ShardHandler |
getShardHandler(org.apache.http.client.HttpClient httpClient) |
Queue<TrackingShardHandlerFactory.ShardRequestAndParams> |
getTrackingQueue() |
boolean |
isTracking() |
static void |
setTrackingQueue(List<org.apache.solr.client.solrj.embedded.JettySolrRunner> runners,
Queue<TrackingShardHandlerFactory.ShardRequestAndParams> queue)
Sets the tracking queue for all nodes participating in this cluster.
|
static void |
setTrackingQueue(MiniSolrCloudCluster cluster,
Queue<TrackingShardHandlerFactory.ShardRequestAndParams> queue)
Sets the tracking queue for all nodes participating in this cluster.
|
void |
setTrackingQueue(Queue<TrackingShardHandlerFactory.ShardRequestAndParams> queue)
Set the tracking queue for this factory.
|
public void setTrackingQueue(Queue<TrackingShardHandlerFactory.ShardRequestAndParams> queue)
Queue.offer(Object)
with a TrackingShardHandlerFactory.ShardRequestAndParams
instance whenever
ShardHandler.submit(ShardRequest, String, org.apache.solr.common.params.ModifiableSolrParams)
is called before the request is actually submitted to the
wrapped HttpShardHandlerFactory
instance.
If a tracking queue is already set then this call will overwrite and replace the previous queue with this one.
queue
- the Queue
to be used for tracking shard requestspublic Queue<TrackingShardHandlerFactory.ShardRequestAndParams> getTrackingQueue()
Queue
being used for tracking, null if none
has been setpublic boolean isTracking()
setTrackingQueue(java.util.List, java.util.Queue)
, false otherwisepublic org.apache.solr.handler.component.ShardHandler getShardHandler()
getShardHandler
in class org.apache.solr.handler.component.HttpShardHandlerFactory
public org.apache.solr.handler.component.ShardHandler getShardHandler(org.apache.solr.client.solrj.impl.Http2SolrClient client)
getShardHandler
in class org.apache.solr.handler.component.HttpShardHandlerFactory
public org.apache.solr.handler.component.ShardHandler getShardHandler(org.apache.http.client.HttpClient httpClient)
getShardHandler
in class org.apache.solr.handler.component.HttpShardHandlerFactory
public void close()
close
in class org.apache.solr.handler.component.HttpShardHandlerFactory
public static void setTrackingQueue(MiniSolrCloudCluster cluster, Queue<TrackingShardHandlerFactory.ShardRequestAndParams> queue)
This is equivalent to calling:
TrackingShardHandlerFactory.setTrackingQueue(cluster.getJettySolrRunners(), queue)
public static void setTrackingQueue(List<org.apache.solr.client.solrj.embedded.JettySolrRunner> runners, Queue<TrackingShardHandlerFactory.ShardRequestAndParams> queue)
runners
- a list of JettySolrRunner
nodesqueue
- an implementation of Queue
which
accepts TrackingShardHandlerFactory.ShardRequestAndParams
instancesCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.