[java] refine and simplify java worker code structure (#2838)

This commit is contained in:
Hao Chen
2018-09-11 01:48:17 +08:00
committed by Robert Nishihara
parent 588c573d41
commit 8414e413a2
97 changed files with 749 additions and 1344 deletions
+13 -37
View File
@@ -1,42 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.ray.parent</groupId>
<artifactId>ray-superpom</artifactId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.ray.parent</groupId>
<artifactId>ray-superpom</artifactId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.ray</groupId>
<artifactId>ray-api</artifactId>
<name>java api for ray</name>
<description>java api for ray</description>
<url></url>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>de.ruedigermoeller</groupId>
<artifactId>fst</artifactId>
</dependency>
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-plasma</artifactId>
</dependency>
</dependencies>
<groupId>org.ray</groupId>
<artifactId>ray-api</artifactId>
<name>ray api</name>
<description>java api for ray</description>
<packaging>jar</packaging>
</project>
@@ -2,7 +2,13 @@
package org.ray.api;
import org.ray.api.function.*;
import org.ray.api.function.RayFunc0;
import org.ray.api.function.RayFunc1;
import org.ray.api.function.RayFunc2;
import org.ray.api.function.RayFunc3;
import org.ray.api.function.RayFunc4;
import org.ray.api.function.RayFunc5;
import org.ray.api.function.RayFunc6;
/**
* This class provides type-safe interfaces for `Ray.call` and `Ray.createActor`.
@@ -10,7 +10,7 @@ public class DefaultRayRuntimeFactory implements RayRuntimeFactory {
@Override
public RayRuntime createRayRuntime() {
try {
Method m = Class.forName("org.ray.core.AbstractRayRuntime").getDeclaredMethod("init");
Method m = Class.forName("org.ray.runtime.AbstractRayRuntime").getDeclaredMethod("init");
m.setAccessible(true);
RayRuntime runtime = (RayRuntime) m.invoke(null);
m.setAccessible(false);