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

Vladimir Ozerov commented on IGNITE-6867:
-----------------------------------------

[~xtern], [~avinogradov], I am not quite sure implemented API is good enough. 

First, inteface inheritance is not correct. Cluster cannot extend local node. 
Instead, local node could extend cluster, as this is an edge case when cluster 
consist of only one node. 
Second, API looks inconsistent. E.g., why {{countNodes}} use {{String}} for 
attribute's value, but {{groupNodes}} return {{Object}}?
Last, super-specialized methods like {{countNodes}} and {{groupNodes}} pollute 
API. What if in future we would like to add more groupings? Instead, correct 
implementation would be to add MXBean wrapper to {{ClusterGroupImpl}}, and 
allow users to navigate from the whole cluster to more specialized projections. 
E.g.:

{code}
interface ClusterMetricsMXBean { 
    ClusterMetricsMXBean forClients();
    ClusterMetricsMXBean forServers();
    ClusterMetricsMXBean forAttribute(String attrName, Object attrValue);

    Collection<String> attributeNames();
    Collection<Object> attributeValues(String attrName);
}
{code}



> Implement new JMX metrics for topology monitoring
> -------------------------------------------------
>
>                 Key: IGNITE-6867
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6867
>             Project: Ignite
>          Issue Type: New Feature
>            Reporter: Aleksey Plekhanov
>            Assignee: Pavel Pereslegin
>              Labels: iep-6, jmx
>             Fix For: 2.4
>
>
> These additional metrics and methods should be implemented:
> * Current topology version
> * Total server nodes count
> * Total client nodes count
> * Method to count nodes filtered by some node attribute
> * Method to count nodes grouped by some node attribute
>  
> There is already a ticket to implement first 2 metrics from this list 
> (IGNITE-6844)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to