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

Added new SysMonitor based on Oshi library #14359

Merged
merged 12 commits into from
Jun 20, 2023

Conversation

hardikbajaj
Copy link
Contributor

@hardikbajaj hardikbajaj commented Jun 1, 2023

Fixes one of the issues in #14157. (SysMonitor on ARM in roadmap)

Description

SysMonitor uses Sigar library, which not only is not maintained and doesn't run on ARM64 arch. A JNA based oshi library was proposed by @abhishekagarwal87 in slack community which is well maintained, used by projects like Apache flink, and also works well on ARM architecture too. Here I introduce v0 of SysMonitorOshi, oshi based SysMonitor for Druid.
This monitor monitors most of the metrics emitted by SysMonitor.java but is a v0 implementation which just consumes metrics emitted by Oshi directly, without modifying/mapping it.

Fixed the bug ...

SysMonitor not usable in ARM architecture

Release note

Added a new monitor SysMonitorOshi to replace SysMonitor. The new monitor has a wider support for different machine architectures including ARM instances. Please switch to SysMonitorOshi as SysMonitor is now deprecated and will be removed in future releases.


Key changed/added classes in this PR
  • SysMonitorOshi.java
  • NoopSysMonitorOshi.java
  • SysMonitorOshiTest.java

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

Copy link
Contributor

@abhishekagarwal87 abhishekagarwal87 left a comment

Choose a reason for hiding this comment

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

This is good. I am not fully done yet but there is some feedback that can be addressed right away.

@clintropolis
Copy link
Member

the 'check-licenses' script we have to help us ensure that we collect all the correct licensing information for our source distributions to meet apache requirements has entries for the licenses it is aware of to normalize them into standard buckets, it looks like maybe something is reporting a string that it hasn't seen before, which looks like what this error is perhaps:

KeyError: 'SPDX-License-Identifier: MIT'

I think if you add that entry into the script and bucket it into the other MIT licenses then it should probably be ok?

Also if there are any transitive dependencies pulled in by this new library they might also need added to the licenses.yaml file. I know this stuff is somewhat tedious, so apologies for that, and still not a perfect system by any means because it is prone to becoming stale, but it does significantly reduce the burden of doing releases.

@abhishekagarwal87
Copy link
Contributor

I also unlinked the community roadmap issue from this PR so that the issue doesn't get closed after this PR is merged :)

@abhishekagarwal87
Copy link
Contributor

Approved and will merge once CI passes. Thank you @hardikbajaj for your contribution.

@hardikbajaj
Copy link
Contributor Author

Thanks @abhishekagarwal87 for giving me this great learning opportunity, in form of a very meaningful Good First issue :). Also thanks for being super supportive and helping me out with your reviews, and teachings.

@abhishekagarwal87 abhishekagarwal87 merged commit 1ea9158 into apache:master Jun 20, 2023
@abhishekagarwal87
Copy link
Contributor

Merged. Appreciate the persistency @hardikbajaj :)

@abhishekagarwal87 abhishekagarwal87 changed the title Added new SysMonitorOshi v0 using Oshi library Added new SysMonitor based on Oshi library Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants