[ 
https://issues.apache.org/jira/browse/IGNITE-8726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Denis Magda updated IGNITE-8726:
--------------------------------
    Affects Version/s: 2.8

> Highlight that memory metrics are local for a node in the docs
> --------------------------------------------------------------
>
>                 Key: IGNITE-8726
>                 URL: https://issues.apache.org/jira/browse/IGNITE-8726
>             Project: Ignite
>          Issue Type: Improvement
>          Components: documentation
>    Affects Versions: 2.8
>            Reporter: Stanislav Lukyanov
>            Priority: Major
>
> Memory Metrics (DataRegionMetrics and DataStorageMetrics) in Ignite are local 
> for each node. However, this is not highlighted in the documentation enough. 
> The code snippets suggest to just call `ignite.dataRegionMetrics()` which 
> seems to be a bit at odds with the general use case of Ignite servers being 
> started via ignite.sh.
> It would be good to have an easily noticeable warning that the metrics will 
> only return data for the local node (and that, for example, on client they 
> would typically always print 0).
> Also, would be nice to include a couple of practical approaches other than 
> JMX to collect metrics. E.g. a snippet of client code getting metrics from 
> all servers:
> {code}
> Collection<String> metricsFromNodes = ignite.compute().broadcast(() -> {
>     Ignite ignite = Ignition.localIgnite();
>     
>     StringBuilder sb = new StringBuilder();
>     
>     sb.append("Node: " + ignite.name());
>     
>     for (DataRegionMetrics metrics : ignite.dataRegionMetrics()) {
>         // append metrics to the builder 
>     }
>     
>     return sb.toString();
> });
> for (String metricsString : metricsFromNodes)
>     System.out.println(metricsString);
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to