[ 
https://issues.apache.org/jira/browse/SOLR-15019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17245374#comment-17245374
 ] 

Andrzej Bialecki edited comment on SOLR-15019 at 12/7/20, 5:46 PM:
-------------------------------------------------------------------

What common strongly-typed metrics we should expose in {{ShardValues}} ? 
Previously we used just these:
 * {{INDEX.sizeInBytes}} - for easier use I propose to expose only "size in GB" 
as that is more practical for any calculations.
 * {{QUERY./select.requestTimes:1minRate}} - this was used in the 
{{SearchRateTrigger}}. It reflects the search load of the replica
 * {{UPDATE./update.requestTimes:1minRate}} - this is new, it reflects the 
indexing load of the replica.

Also, IMHO in addition to these strongly-typed metrics the {{ShardValues}} 
interface should allow fetching arbitrary weakly-typed replica metrics.


was (Author: ab):
What common strongly-typed metrics we should expose in {{ShardValues}} ? 
Previously we used just these:
 * {{INDEX.sizeInBytes}} - for easier use I propose to expose only "size in GB" 
as that is more practical for any calculations.
 * {{QUERY./select.requestTimes:1minRate}} - this was used in the 
{{SearchRateTrigger}}. It reflects the search load of the replica
 * {{UPDATE./update.requestTimes:1minRate}} - this is new, it reflects the 
indexing load of the replica.

Also, IMHO in addition to these strongly-typed metrics the {{ShardValues}} 
interface should allow fetching arbitrary weakly-typed metrics.

> Replica placement API needs a way to fetch existing replica metrics
> -------------------------------------------------------------------
>
>                 Key: SOLR-15019
>                 URL: https://issues.apache.org/jira/browse/SOLR-15019
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Andrzej Bialecki
>            Priority: Major
>
> Replica placement API was introduced in SOLR-14613. It offers a few sample 
> (and simple) implementations of placement plugins.
> However, this API doesn't offer support for retrieving per-replica metrics, 
> which are required for calculating more realistic placements. For example, 
> when calculating placements for ADDREPLICA on an already existing collection 
> the plugin should know what is the size of replica in order to avoid placing 
> large replicas on nodes with insufficient free disk space.
> After discussing this with [~ilan] we propose the following additions to the 
> API:
> * use the existing {{AttributeFetcher}} interface as a facade for retrieving 
> per-replica values (currently it only retrieves per-node values)
> * add {{ShardValues}} interface to represent strongly-typed API for key 
> metrics, such as replica size, number of docs, number of update and search 
> requests.
> Plugins could then use this API like this:
> {code}
> AttributeFetcher attributeFetcher = ...
> SolrCollection solrCollection = ...
> Set<String> metricNames = ...
> attributeFetcher.requestCollectionMetrics(solrCollection, 
> solrCollection.getShardNames(), metricNames);
> AttributeValues attributeValues = attributeFetcher.fetchAttributes();
> ShardValues shardValues = 
> attributeValues.getShardMetrics(solrCollection.getName(), shardName);
> int sizeInGB = shardValues.getSizeInGB(); // retrieves shard leader metrics
> int replicaSizeInGB = shardValues.getSizeInGB(replica);
> {code} 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to