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

Prepend ":job_id:<jobid>" to java-worker-<jobid>-<pid>.log to avoid too many executor logs flushed to shell console #321

Closed
jiafuzha opened this issue Mar 23, 2023 · 1 comment

Comments

@jiafuzha
Copy link
Contributor

In ray 2.3, there is PR to get real job id from log file content instead of log file name. Check log_monitor.py. If there is not job id (pattern: ":job_id:") found, then job_id field of log message object is None. For log message without job_id set, ray just blindly prints it out in console.

After adding below code snippet in "premain" method of Java agent introduced in #318 , raydp just performs consistently across different ray versions. No executor logs being flushed to console.

String jobId = System.getenv("RAY_JOB_ID"); String rayAddress = System.getProperty("ray.address"); if (jobId != null && rayAddress != null) { try (FileWriter writer = new FileWriter(logDir + "/java-worker-" + jobId + "-" + pid + ".log")) { writer.write(":job_id:" + jobId + "\n"); } }

@jiafuzha
Copy link
Contributor Author

jiafuzha commented Apr 4, 2023

merged in #323

@jiafuzha jiafuzha closed this as completed Apr 4, 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

No branches or pull requests

1 participant