Package org.apache.solr.analytics.stream
Class AnalyticsShardRequestManager
- java.lang.Object
-
- org.apache.solr.analytics.stream.AnalyticsShardRequestManager
-
public class AnalyticsShardRequestManager extends Object
This class manages the requesting of shard responses from all shards in the queried collection.Shard Requests are sent to the
AnalyticsHandler
instead of theAnalyticsComponent
, which is the entrance to the analytics component for all client requests.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AnalyticsShardRequestManager.AnalyticsShardRequester
A class that opens a connection to a given solr instance, a selected replica of the queried collection, and sends a analytics request to theAnalyticsHandler
.
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.solr.client.solrj.impl.CloudSolrClient
cloudSolrClient
protected List<String>
replicaUrls
-
Constructor Summary
Constructors Constructor Description AnalyticsShardRequestManager(org.apache.solr.common.params.SolrParams params, AnalyticsRequestManager manager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
pickShards(String collection)
Pick one replica from each shard to send the shard requests to.void
sendRequests(String collection, String zkHost)
Send out shard requests to each shard in the given collection.
-
-
-
Constructor Detail
-
AnalyticsShardRequestManager
public AnalyticsShardRequestManager(org.apache.solr.common.params.SolrParams params, AnalyticsRequestManager manager)
-
-
Method Detail
-
sendRequests
public void sendRequests(String collection, String zkHost) throws IOException
Send out shard requests to each shard in the given collection.- Parameters:
collection
- that is being queriedzkHost
- of the solr cloud hosting the collection- Throws:
IOException
- if an exception occurs while picking shards or sending requests
-
pickShards
protected void pickShards(String collection) throws IOException
Pick one replica from each shard to send the shard requests to.- Parameters:
collection
- that is being queried- Throws:
IOException
- if an exception occurs while finding replicas
-
-