Class SolrClientNodeStateProvider
- java.lang.Object
- 
- org.apache.solr.client.solrj.impl.SolrClientNodeStateProvider
 
- 
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- NodeStateProvider,- org.apache.solr.common.MapSerializable,- org.apache.solr.common.MapWriter,- org.apache.solr.common.NavigableObject,- org.apache.solr.common.SolrCloseable,- org.noggit.JSONWriter.Writable
 
 public class SolrClientNodeStateProvider extends Object implements NodeStateProvider, org.apache.solr.common.MapWriter The realNodeStateProvider, which communicates with Solr via SolrJ.
- 
- 
Constructor SummaryConstructors Constructor Description SolrClientNodeStateProvider(org.apache.solr.client.solrj.impl.CloudHttp2SolrClient solrClient)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected Map<String,Object>fetchReplicaMetrics(String node, Map<String,org.apache.solr.common.util.Pair<String,org.apache.solr.common.cloud.Replica>> metricsKeyVsTagReplica)protected Map<String,Object>fetchTagValues(String node, Collection<String> tags)voidforEachReplica(String node, Consumer<org.apache.solr.common.cloud.Replica> consumer)static voidforEachReplica(Map<String,Map<String,List<org.apache.solr.common.cloud.Replica>>> collectionVsShardVsReplicas, Consumer<org.apache.solr.common.cloud.Replica> consumer)protected org.apache.solr.client.solrj.impl.ClusterStateProvidergetClusterStateProvider()Map<String,Object>getNodeValues(String node, Collection<String> tags)Get the value of each tag for a given nodeMap<String,Map<String,List<org.apache.solr.common.cloud.Replica>>>getReplicaInfo(String node, Collection<String> keys)Get the details of each replica in a node.protected voidreadReplicaDetails()StringtoString()voidwriteMap(org.apache.solr.common.MapWriter.EntryWriter ew)- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
- 
 
- 
- 
- 
Method Detail- 
getClusterStateProviderprotected org.apache.solr.client.solrj.impl.ClusterStateProvider getClusterStateProvider() 
 - 
readReplicaDetailsprotected void readReplicaDetails() throws IOException- Throws:
- IOException
 
 - 
writeMappublic void writeMap(org.apache.solr.common.MapWriter.EntryWriter ew) throws IOException- Specified by:
- writeMapin interface- org.apache.solr.common.MapWriter
- Throws:
- IOException
 
 - 
getNodeValuespublic Map<String,Object> getNodeValues(String node, Collection<String> tags) Description copied from interface:NodeStateProviderGet the value of each tag for a given node- Specified by:
- getNodeValuesin interface- NodeStateProvider
- Parameters:
- node- node name
- tags- tag names
- Returns:
- a map of tag vs value
 
 - 
forEachReplicapublic void forEachReplica(String node, Consumer<org.apache.solr.common.cloud.Replica> consumer) 
 - 
forEachReplicapublic static void forEachReplica(Map<String,Map<String,List<org.apache.solr.common.cloud.Replica>>> collectionVsShardVsReplicas, Consumer<org.apache.solr.common.cloud.Replica> consumer) 
 - 
getReplicaInfopublic Map<String,Map<String,List<org.apache.solr.common.cloud.Replica>>> getReplicaInfo(String node, Collection<String> keys) Description copied from interface:NodeStateProviderGet the details of each replica in a node. It attempts to fetch as much details about the replica as mentioned in the keys list. It is not necessary to give all detailsThe format is {collection:shard :[{replicadetails}]}. - Specified by:
- getReplicaInfoin interface- NodeStateProvider
- Returns:
- map of replica infos per collection/shard
 
 - 
fetchReplicaMetricsprotected Map<String,Object> fetchReplicaMetrics(String node, Map<String,org.apache.solr.common.util.Pair<String,org.apache.solr.common.cloud.Replica>> metricsKeyVsTagReplica) 
 - 
closepublic void close() throws IOException- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Throws:
- IOException
 
 
- 
 
-