public class SolrClientNodeStateProvider extends Object implements NodeStateProvider, MapWriter
NodeStateProvider
, which communicates with Solr via SolrJ.MapWriter.EntryWriter
Modifier and Type | Field and Description |
---|---|
static SolrClientNodeStateProvider |
INST |
protected Map<String,Map<String,Map<String,List<ReplicaInfo>>>> |
nodeVsCollectionVsShardVsReplicaInfo |
Constructor and Description |
---|
SolrClientNodeStateProvider(CloudSolrClient solrClient) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected Map<String,Object> |
fetchReplicaMetrics(String node,
Map<String,Pair<String,ReplicaInfo>> metricsKeyVsTagReplica) |
protected Map<String,Object> |
fetchTagValues(String node,
Collection<String> tags) |
void |
forEachReplica(String node,
Consumer<ReplicaInfo> consumer) |
protected ClusterStateProvider |
getClusterStateProvider() |
Map<String,Object> |
getNodeValues(String node,
Collection<String> tags)
Get the value of each tag for a given node
|
Map<String,Map<String,List<ReplicaInfo>>> |
getReplicaInfo(String node,
Collection<String> keys)
Get the details of each replica in a node.
|
protected void |
readReplicaDetails() |
String |
toString() |
void |
writeMap(MapWriter.EntryWriter ew) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isClosed
_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr
public static SolrClientNodeStateProvider INST
public SolrClientNodeStateProvider(CloudSolrClient solrClient)
protected ClusterStateProvider getClusterStateProvider()
protected void readReplicaDetails() throws IOException
IOException
public void writeMap(MapWriter.EntryWriter ew) throws IOException
writeMap
in interface MapWriter
IOException
public Map<String,Object> getNodeValues(String node, Collection<String> tags)
NodeStateProvider
getNodeValues
in interface NodeStateProvider
node
- node nametags
- tag namespublic void forEachReplica(String node, Consumer<ReplicaInfo> consumer)
public Map<String,Map<String,List<ReplicaInfo>>> getReplicaInfo(String node, Collection<String> keys)
NodeStateProvider
The format is {collection:shard :[{replicadetails}]}.
getReplicaInfo
in interface NodeStateProvider
protected Map<String,Object> fetchReplicaMetrics(String node, Map<String,Pair<String,ReplicaInfo>> metricsKeyVsTagReplica)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.