[DISCUSSION] Add cache statistics switch to control script

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[DISCUSSION] Add cache statistics switch to control script

Shishkov Ilya-2
Dear Ignite Community!
I propose to discuss the addition of a new feature for control script:
cache statistics switch (enabling / disabling). Currently, cache statistics
can be toggled only via IgniteVisorCmd or JMX.
I've created the corresponding issue [1] and suggest adding an extra option
to a '--cache' command of the control script, eg.:

--cache statistics enable|disable [cacheName1,...,cacheNameN]

Please, tell me if you have any suggestions or remarks against this feature.

1. https://issues.apache.org/jira/browse/IGNITE-14913
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Add cache statistics switch to control script

agura
Hi, Ilya

Could you please provide more details about how it should work (in
issue description)? E.g. what if I pass the cache group name instead
of the name of a particular cache? What if I will not pass any cache
names?

Also we don't use the word "statistics" anymore (while it is still
called statistics in configuration). What about the word "metrics"?

On Wed, Jun 16, 2021 at 2:31 PM Shishkov Ilya <[hidden email]> wrote:

>
> Dear Ignite Community!
> I propose to discuss the addition of a new feature for control script:
> cache statistics switch (enabling / disabling). Currently, cache statistics
> can be toggled only via IgniteVisorCmd or JMX.
> I've created the corresponding issue [1] and suggest adding an extra option
> to a '--cache' command of the control script, eg.:
>
> --cache statistics enable|disable [cacheName1,...,cacheNameN]
>
> Please, tell me if you have any suggestions or remarks against this feature.
>
> 1. https://issues.apache.org/jira/browse/IGNITE-14913
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Add cache statistics switch to control script

Shishkov Ilya-2
Hi, Andrey

Thanks for your comments, I have updated the ticket.

Initially, I assumed the 'VisorCacheToggleStatisticsTask' should be used.
But, as I see, VisorCacheToggleStatisticsTask doesn't perform any checks of
cache existence [1], and this work is done by the IgniteVisorCmd [2].
Moreover, it seems that will be more convenient to pass regular expression
for cache name (in a similar way as in '--cache list' command) instead of
cache names list and add ability to show status of statistics switch
(enabled / disabled), e.g.:
    --cache statistics enable|disable|status regexPattern
or
   --cache metrics enable|disable|status regexPattern

So, it seems that we should make another class for this purpose.


> E.g. what if I pass the cache group name instead of the name of a
particular cache?

As I understand, we can enable / disable cache statistics via JMX and
VisorCMD per cache, not per group. I think we should keep the same approach.


> What if I will not pass any cache names?

In case of an empty 'regexPattern', the control script should finish
execution with an error. If no matching caches are found, the control
script should print a message about matching caches' absence.


> Also we don't use the word "statistics" anymore (while it is still called
statistics in configuration).
> What about the word "metrics"?

I'm ok with the word "metrics" instead of the word "statistics" if no one
minds.


1.
https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheToggleStatisticsTask.java#L58
2.
https://github.com/apache/ignite/blob/master/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala#L304

ср, 16 июн. 2021 г. в 16:01, Andrey Gura <[hidden email]>:

> Hi, Ilya
>
> Could you please provide more details about how it should work (in
> issue description)? E.g. what if I pass the cache group name instead
> of the name of a particular cache? What if I will not pass any cache
> names?
>
> Also we don't use the word "statistics" anymore (while it is still
> called statistics in configuration). What about the word "metrics"?
>
> On Wed, Jun 16, 2021 at 2:31 PM Shishkov Ilya <[hidden email]>
> wrote:
> >
> > Dear Ignite Community!
> > I propose to discuss the addition of a new feature for control script:
> > cache statistics switch (enabling / disabling). Currently, cache
> statistics
> > can be toggled only via IgniteVisorCmd or JMX.
> > I've created the corresponding issue [1] and suggest adding an extra
> option
> > to a '--cache' command of the control script, eg.:
> >
> > --cache statistics enable|disable [cacheName1,...,cacheNameN]
> >
> > Please, tell me if you have any suggestions or remarks against this
> feature.
> >
> > 1. https://issues.apache.org/jira/browse/IGNITE-14913
>