-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[Java] make java worker log file prefix (default to java-worker) configurable #33797
Conversation
…igurable Signed-off-by: jiafu zhang <[email protected]>
…igurable Signed-off-by: jiafu zhang <[email protected]>
@jovany-wang @kira-lin please help review. |
This is going to break log monitor, please make the corresponding change there as well: ray/python/ray/_private/log_monitor.py Lines 200 to 202 in af759eb
|
As tested, log monitor worked well with either property "ray.logging.file-prefix" set to "raydp-java-worker" or unset and default to "java-worker". Could you please be more specific why log_monitor is breaking? From code, 'glob.glob(f"{self.logs_dir}/java-worker*.log"' returns empty list if there is not java-worker* files. thanks |
@zjf2012 So your purpose is to prevent polling java worker log messages to GCS right? |
exactly. And it's configurable. |
@@ -89,6 +89,7 @@ ray { | |||
max-file-size: 500MB | |||
// Maximum number of backup files to keep around. | |||
max-backup-files: 10 | |||
file-prefix: java-worker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comment on what this field is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
DO NOT MERGE until 2.4 branch cut. |
…igurable Signed-off-by: jiafu zhang <[email protected]>
@zjf2012 do you need this feature in Ray2.4? |
Ah. This is a hacky way to not to stream log through log monitor it seems. Alternatively an env var in log monitor yo flag this will do. |
yes, we need it in ray 2.4. By the way, why do we need to wait branch 2.4 before merging it? |
@simon-mo If we don't have the need that preventing polling only Java log, it makes more sense to add a flag to logmonitor. |
@zjf2012 Because we changed the releasing process. We shouldn't merge unnecessary changes when in the process of releasing duration.
|
I'd like @simon-mo to confirm about his open question first. Thanks for working on this @jovany-wang |
With the comments added, the change LGTM |
Thanks for the contribution! This will be in the next release. |
…igurable (ray-project#33797) For java worker, it's log file always being prefixed with "java-worker". And in python log_monitor.py, it hardcodes "java-worker*.log" to be polled for new log msg periodically. Some configs, like log_to_driver and RAY_BACKEND_LOG_LEVEL, don't prevent the log monitor from polling and publishing logs to gcs. To save some CPU cycle and network bandwidth, especially if there is large amount of logs produced from JVM, we can have an option. like a JVM system property, to set log file prefix for java worker instead of hard coded to "java-worker". Signed-off-by: elliottower <[email protected]>
…igurable (ray-project#33797) For java worker, it's log file always being prefixed with "java-worker". And in python log_monitor.py, it hardcodes "java-worker*.log" to be polled for new log msg periodically. Some configs, like log_to_driver and RAY_BACKEND_LOG_LEVEL, don't prevent the log monitor from polling and publishing logs to gcs. To save some CPU cycle and network bandwidth, especially if there is large amount of logs produced from JVM, we can have an option. like a JVM system property, to set log file prefix for java worker instead of hard coded to "java-worker". Signed-off-by: Jack He <[email protected]>
Why are these changes needed?
For java worker, it's log file always being prefixed with "java-worker". And in python log_monitor.py, it hardcodes "java-worker*.log" to be polled for new log msg periodically. Some configs, like log_to_driver and RAY_BACKEND_LOG_LEVEL, don't prevent the log monitor from polling and publishing logs to gcs. To save some CPU cycle and network bandwidth, especially if there is large amount of logs produced from JVM, we can have an option. like a JVM system property, to set log file prefix for java worker instead of hard coded to "java-worker".
Related issue number
Closes #33787
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.