Skip to content

Adding jvmVersion dimension in JVM Monitor#16262

Merged
soumyava merged 1 commit intoapache:masterfrom
pranavbhole:jvmVersion
Apr 11, 2024
Merged

Adding jvmVersion dimension in JVM Monitor#16262
soumyava merged 1 commit intoapache:masterfrom
pranavbhole:jvmVersion

Conversation

@pranavbhole
Copy link
Copy Markdown
Contributor

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.

private final Map<String, String[]> dimensions;

private static final String JVM_VERSION = "jvmVersion";
private static final String JAVA_VERSION = System.getProperty("java.version");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What do these strings typically look like? Just wanting to make sure the thing we are emitting is useful.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

here's the typical output of System.getProperty("java.version") for each major Java version:

Java 1.0 - 1.1: These versions didn't have a specific format for java.version. They often returned something like "1.0" or "1.1".

Java 1.2 - 1.4: These versions commonly returned versions like "1.2.2", "1.3.1", or "1.4.2".

Java 5 (1.5): Typically, you'd see versions like "1.5.0_22".

Java 6 (1.6): Commonly returned something like "1.6.0_45".

Java 7 (1.7): Versions often looked like "1.7.0_80".

Java 8 (1.8): Frequently returned versions such as "1.8.0_291".

Java 9 (9): Introduced the new versioning scheme, so you'd see something like "9.0.4".

Java 10: Versions would be like "10.0.1".

Java 11: You'd typically see versions like "11.0.11".

Java 12: Versions could look like "12.0.2".

Java 13: Versions might be something like "13.0.2".

Java 14: Versions could look like "14.0.1".

Java 15: Versions might be like "15.0.1".

Java 16: Versions could look like "16.0.1".

Java 17: Versions might be like "17".

Java 18: Versions might be like "18".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

minor versions are postfix with _number

@soumyava soumyava merged commit fc2600b into apache:master Apr 11, 2024
@adarshsanjeev adarshsanjeev added this to the 30.0.0 milestone May 6, 2024
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.

4 participants