Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGNITE-18232 Remove of CacheMetricsMXBean legacy JMX bean #10485

Merged
merged 66 commits into from Jan 23, 2023

Conversation

Vladsz83
Copy link
Contributor

Thank you for submitting the pull request to the Apache Ignite.

In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:

The Contribution Checklist

  • There is a single JIRA ticket related to the pull request.
  • The web-link to the pull request is attached to the JIRA ticket.
  • The JIRA ticket has the Patch Available state.
  • The pull request body describes changes that have been made.
    The description explains WHAT and WHY was made instead of HOW.
  • The pull request title is treated as the final commit message.
    The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • A reviewer has been mentioned through the JIRA comments
    (see the Maintainers list)
  • The pull request has been checked by the Teamcity Bot and
    the green visa attached to the JIRA ticket (see TC.Bot: Check PR)

Notes

If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com #ignite channel.

…gument_is_not_casted_implicitly' into IGNITE-15003-calcite-Function_argument_is_not_casted_implicitly
…gument_is_not_casted_implicitly' into IGNITE-15003-calcite-Function_argument_is_not_casted_implicitly

# Conflicts:
#	modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/RexImpTable.java
#	modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/IgniteSqlValidator.java
#	modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/DataTypesTest.java
@nizhikov
Copy link
Contributor

Can we keep one of CacheClusterMetricsMXBeanImpl or CacheLocalMetricsMXBeanImpl and implement in it JCache interfaces to reduce changes? It seems like new classes in general just a copy of existing.

@Vladsz83
Copy link
Contributor Author

Vladsz83 commented Jan 19, 2023

It seems like new classes in general just a copy of existing.

JCache's interfaces are smaller, contain fewer methods. JCache's CacheStatisticsMXBean has 11 statistics methods. It doesn't have Ignite's getEntryProcessorHits or getRebalancingKeysRate. And many others from CacheMetrics. To support JCache, we don't need entire old CacheClusterMetricsMXBeanImpl. Also, regarding to JCache spec, CacheMXBean and CacheStatisticsMXBean are separated beans. And are enabled/disabled separately by CacheManager#enableManagement() and CacheManager#enableStatistics(). Now we have 2 implementations of these beans not exposed by Ignite's interfaces.

@nizhikov
Copy link
Contributor

Yes. We should cleanup existing MXBeans and keep only methods required by JCache specification.

@Vladsz83
Copy link
Contributor Author

Yes. We should cleanup existing MXBeans and keep only methods required by JCache specification.

It is done in the new beans

@nizhikov
Copy link
Contributor

We don't need to copy code from existing to those new classes. Please, revert removal of existing JMX class and keep required methods in it.

@Vladsz83
Copy link
Contributor Author

We don't need to copy code from existing to those new classes. Please, revert removal of existing JMX class and keep required methods in it.

Done. I keep CacheClusterMetricsMXBeanImpl. But I think we violate S principle of SOLID. CacheStatisticsMXBean and CacheMXBean should be split and created separately on demand. The old beans implements the both interfaces. However, we pass JCache spec tests

*/
public class CacheClusterMetricsMXBeanImpl implements CacheMetricsMXBean {
public class CacheClusterMetricsMXBeanImpl implements CacheStatisticsMXBean, CacheMXBean {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It this bean still provide cluster-wide values?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It uses IgniteCache#metrics(). There is also IgniteCache#localMetrics()

@nizhikov nizhikov changed the title IGNITE-18232 : [IEP-80] Remove of CacheMetricsMXBean legacy JMX bean, v3 : keep JCache beans IGNITE-18232 Remove of CacheMetricsMXBean legacy JMX bean Jan 23, 2023
@nizhikov nizhikov merged commit b54943a into apache:master Jan 23, 2023
@Vladsz83 Vladsz83 deleted the IGNITE-18232-keep-jcache-bean branch January 23, 2023 14:41
luchnikovbsk pushed a commit to luchnikovbsk/ignite that referenced this pull request Jan 25, 2023
luchnikovbsk pushed a commit to luchnikovbsk/ignite that referenced this pull request Jan 25, 2023
luchnikovbsk pushed a commit to luchnikovbsk/ignite that referenced this pull request Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants