Package ray java jars into wheels (#6600)

This commit is contained in:
chaokunyang
2020-01-10 11:41:00 +08:00
committed by Hao Chen
parent e5dded917c
commit 4097d076d4
8 changed files with 89 additions and 13 deletions
@@ -6,6 +6,8 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableList;
@@ -71,9 +73,15 @@ public abstract class BaseMultiLanguageTest {
String nodeManagerPort = String.valueOf(NetworkUtil.getUnusedPort());
// Start ray cluster.
// jars in the `ray` wheel doesn't contains test classes, so we add test classes explicitly.
// Since mvn test classes contains `test` in path and bazel test classes is located at a jar
// with `test` included in the name, we can check classpath `test` to filter out test classes.
String classpath = Stream.of(System.getProperty("java.class.path").split(":"))
.filter(s -> !s.contains(" ") && s.contains("test"))
.collect(Collectors.joining(":"));
String workerOptions =
" -classpath " + System.getProperty("java.class.path");
" -classpath " + classpath;
// Start ray cluster.
List<String> startCommand = ImmutableList.of(
"ray",
"start",