mirror of
https://github.com/wassname/ray.git
synced 2026-06-30 08:46:01 +08:00
[Java] Load driver resources from local path. (#3001)
## What do these changes do? 1. Add a configuration item `driver.resource-path`. 2. Load driver resources from the local path which is specified in the `ray.conf`. Before this change, we should add all driver resources(like user's jar package, dependencies package and config files) into `classpath`. After this change, we should add the driver resources into the mount path which we can configure it in `ray.conf`, and we shouldn't configure `classpath` for driver resources any more. ## Related issue number N/A
This commit is contained in:
@@ -11,6 +11,7 @@ public class RayConfigTest {
|
||||
@Test
|
||||
public void testCreateRayConfig() {
|
||||
System.setProperty("ray.home", "/path/to/ray");
|
||||
System.setProperty("ray.driver.resource-path", "path/to/ray/driver/resource/path");
|
||||
RayConfig rayConfig = RayConfig.create();
|
||||
|
||||
Assert.assertEquals("/path/to/ray", rayConfig.rayHome);
|
||||
@@ -19,8 +20,12 @@ public class RayConfigTest {
|
||||
|
||||
System.setProperty("ray.home", "");
|
||||
rayConfig = RayConfig.create();
|
||||
|
||||
Assert.assertEquals(System.getProperty("user.dir"), rayConfig.rayHome);
|
||||
Assert.assertEquals(System.getProperty("user.dir") +
|
||||
"/build/src/common/thirdparty/redis/src/redis-server", rayConfig.redisServerExecutablePath);
|
||||
|
||||
Assert.assertEquals("path/to/ray/driver/resource/path", rayConfig.driverResourcePath);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user