mirror of
https://github.com/wassname/ray.git
synced 2026-07-26 13:37:24 +08:00
Fix the java_worker_options parameter (#7537)
* fix Java CI * Minor fix * move json.loads out of build_java_worker_command * lint * fix cross language test
This commit is contained in:
@@ -97,6 +97,7 @@ define_java_module(
|
||||
deps = [
|
||||
":org_ray_ray_api",
|
||||
":org_ray_ray_runtime",
|
||||
"@maven//:com_google_code_gson_gson",
|
||||
"@maven//:com_google_guava_guava",
|
||||
"@maven//:com_sun_xml_bind_jaxb_core",
|
||||
"@maven//:com_sun_xml_bind_jaxb_impl",
|
||||
|
||||
@@ -4,6 +4,7 @@ def gen_java_deps():
|
||||
maven_install(
|
||||
artifacts = [
|
||||
"com.beust:jcommander:1.72",
|
||||
"com.google.code.gson:gson:2.8.5",
|
||||
"com.google.guava:guava:27.0.1-jre",
|
||||
"com.google.protobuf:protobuf-java:3.8.0",
|
||||
"com.puppycrawl.tools:checkstyle:8.15",
|
||||
|
||||
@@ -27,6 +27,11 @@
|
||||
<artifactId>ray-runtime</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.ray.api.test;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.gson.Gson;
|
||||
import java.io.File;
|
||||
import java.lang.ProcessBuilder.Redirect;
|
||||
import java.util.List;
|
||||
@@ -77,8 +78,7 @@ public abstract class BaseMultiLanguageTest {
|
||||
String classpath = Stream.of(System.getProperty("java.class.path").split(":"))
|
||||
.filter(s -> !s.contains(" ") && s.contains("test"))
|
||||
.collect(Collectors.joining(":"));
|
||||
String workerOptions =
|
||||
" -classpath " + classpath;
|
||||
String workerOptions = new Gson().toJson(ImmutableList.of("-classpath", classpath));
|
||||
// Start ray cluster.
|
||||
List<String> startCommand = ImmutableList.of(
|
||||
"ray",
|
||||
|
||||
@@ -52,7 +52,7 @@ def py_func_pass_python_actor_handle():
|
||||
counter = Counter.remote(2)
|
||||
f = ray.java_function("org.ray.api.test.CrossLanguageInvocationTest",
|
||||
"callPythonActorHandle")
|
||||
r = f.remote(counter._serialization_helper())
|
||||
r = f.remote(counter._serialization_helper()[0])
|
||||
return ray.get(r)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user