Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CELEBORN-1682] Add java tools.jar into classpath for JVM quake
### What changes were proposed in this pull request? Add java tools.jar into classpath for JVM quake. ### Why are the changes needed? Meet below issue with `celeborn.worker.jvmQuake.enabled=true`, see #2061 ``` 24/11/03 15:51:08,453 ERROR [main] Worker: Initialize worker failed. java.lang.NoClassDefFoundError: sun/jvmstat/monitor/HostIdentifier at org.apache.celeborn.service.deploy.worker.monitor.JVMQuake$.monitoredVm$lzycompute(JVMQuake.scala:180) at org.apache.celeborn.service.deploy.worker.monitor.JVMQuake$.monitoredVm(JVMQuake.scala:179) at org.apache.celeborn.service.deploy.worker.monitor.JVMQuake$.ygcExitTimeMonitor$lzycompute(JVMQuake.scala:185) at org.apache.celeborn.service.deploy.worker.monitor.JVMQuake$.ygcExitTimeMonitor(JVMQuake.scala:184) at org.apache.celeborn.service.deploy.worker.monitor.JVMQuake$.org$apache$celeborn$service$deploy$worker$monitor$JVMQuake$$getLastExitTime(JVMQuake.scala:192) at org.apache.celeborn.service.deploy.worker.monitor.JVMQuake.start(JVMQuake.scala:66) at org.apache.celeborn.service.deploy.worker.Worker.<init>(Worker.scala:360) at org.apache.celeborn.service.deploy.worker.Worker$.main(Worker.scala:1041) at org.apache.celeborn.service.deploy.worker.Worker.main(Worker.scala) Caused by: java.lang.ClassNotFoundException: sun.jvmstat.monitor.HostIdentifier at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 9 more ``` Related code: https://github.com/apache/celeborn/blob/c12e8881ab5b03e39a8b53d038a283351bf5906c/project/JDKTools.scala#L58-L75 Similar issue: vladimirvivien/jmx-cli#4 After copy the `tools.jar` into worker-jars, the issue got resolved. It is better that to involve the `tools.jar` automatically without copy. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? <img width="1202" alt="image" src="https://github.com/user-attachments/assets/af8f6c0d-9123-4a73-93b5-69836c5f826d"> Closes #2874 from turboFei/jdk_tools. Authored-by: Wang, Fei <[email protected]> Signed-off-by: SteNicholas <[email protected]>
- Loading branch information