You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "piotrp (via GitHub)" <gi...@apache.org> on 2026/02/24 23:00:37 UTC
[PR] [FLINK-39151][metrics] Hide warning about UnixOperatingSystemMXBean missing on Windows [flink]
piotrp opened a new pull request, #27662:
URL: https://github.com/apache/flink/pull/27662
## What is the purpose of the change
Removes a scarily-looking warning shown when running Flink on Windows. It's not "UNIX", so `UnixOperatingSystemMXBean` will never be available.
## Brief change log
- hidden warning message on Windows
- added test exclusion for Windows OS
## Verifying this change
This change hides a warning on Windows and related test was broken on Windows so it was disabled.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? docs for Linux/Unix-only feature
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-39151][metrics] Hide warning about UnixOperatingSystemMXBean missing on Windows [flink]
Posted by "Zakelly (via GitHub)" <gi...@apache.org>.
Zakelly commented on code in PR #27662:
URL: https://github.com/apache/flink/pull/27662#discussion_r3056337993
##########
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/util/MetricUtils.java:
##########
@@ -351,7 +352,7 @@ static void instantiateFileDescriptorMetrics(MetricGroup metrics) {
metrics.<Long, Gauge<Long>>gauge("Max", unixMXBean::getMaxFileDescriptorCount);
metrics.<Long, Gauge<Long>>gauge("Open", unixMXBean::getOpenFileDescriptorCount);
- } else {
+ } else if (!OperatingSystem.isWindows()) {
Review Comment:
LGTM.
sorry for the late reply, I didn't receive any notification.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-39151][metrics] Hide warning about UnixOperatingSystemMXBean missing on Windows [flink]
Posted by "piotrp (via GitHub)" <gi...@apache.org>.
piotrp commented on PR #27662:
URL: https://github.com/apache/flink/pull/27662#issuecomment-3959582372
@flinkbot run azure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-39151][metrics] Hide warning about UnixOperatingSystemMXBean missing on Windows [flink]
Posted by "piotrp (via GitHub)" <gi...@apache.org>.
piotrp commented on code in PR #27662:
URL: https://github.com/apache/flink/pull/27662#discussion_r3052549487
##########
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/util/MetricUtils.java:
##########
@@ -351,7 +352,7 @@ static void instantiateFileDescriptorMetrics(MetricGroup metrics) {
metrics.<Long, Gauge<Long>>gauge("Max", unixMXBean::getMaxFileDescriptorCount);
metrics.<Long, Gauge<Long>>gauge("Open", unixMXBean::getOpenFileDescriptorCount);
- } else {
+ } else if (!OperatingSystem.isWindows()) {
Review Comment:
@Zakelly can you check whether it looks ok now?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-39151][metrics] Hide warning about UnixOperatingSystemMXBean missing on Windows [flink]
Posted by "Zakelly (via GitHub)" <gi...@apache.org>.
Zakelly commented on code in PR #27662:
URL: https://github.com/apache/flink/pull/27662#discussion_r3004882741
##########
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/util/MetricUtils.java:
##########
@@ -351,7 +352,7 @@ static void instantiateFileDescriptorMetrics(MetricGroup metrics) {
metrics.<Long, Gauge<Long>>gauge("Max", unixMXBean::getMaxFileDescriptorCount);
metrics.<Long, Gauge<Long>>gauge("Open", unixMXBean::getOpenFileDescriptorCount);
- } else {
+ } else if (!OperatingSystem.isWindows()) {
Review Comment:
It is reasonable to output a warning when initialization fails. Users need to be informed that certain features have been disabled.
I'd suggest refining the warning messages to avoid confusion.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-39151][metrics] Hide warning about UnixOperatingSystemMXBean missing on Windows [flink]
Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #27662:
URL: https://github.com/apache/flink/pull/27662#issuecomment-3955238460
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "be0e9d0559e6ffd2023a45104f8b26792558bc4e",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "be0e9d0559e6ffd2023a45104f8b26792558bc4e",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* be0e9d0559e6ffd2023a45104f8b26792558bc4e UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-39151][metrics] Hide warning about UnixOperatingSystemMXBean missing on Windows [flink]
Posted by "piotrp (via GitHub)" <gi...@apache.org>.
piotrp commented on code in PR #27662:
URL: https://github.com/apache/flink/pull/27662#discussion_r3005130934
##########
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/util/MetricUtils.java:
##########
@@ -351,7 +352,7 @@ static void instantiateFileDescriptorMetrics(MetricGroup metrics) {
metrics.<Long, Gauge<Long>>gauge("Max", unixMXBean::getMaxFileDescriptorCount);
metrics.<Long, Gauge<Long>>gauge("Open", unixMXBean::getOpenFileDescriptorCount);
- } else {
+ } else if (!OperatingSystem.isWindows()) {
Review Comment:
Ok, added. This needed some more code because MiniCluster calls this method twice - once as a JobMaster, once as a TaskManager, and a single log line is enough.
I'm not convinced, as you want to inform Windows developers that a Unix-specific metric, present only in `UnixOperatingSystemMXBean`, is not available to them.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-39151][metrics] Hide warning about UnixOperatingSystemMXBean missing on Windows [flink]
Posted by "Zakelly (via GitHub)" <gi...@apache.org>.
Zakelly merged PR #27662:
URL: https://github.com/apache/flink/pull/27662
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org