[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
@@ -11,7 +11,7 @@ import org.ray.api.Ray;
import org.ray.api.RayActor;
import org.ray.api.RayObject;
import org.ray.api.annotation.RayRemote;
import org.ray.util.logger.RayLog;
import org.ray.runtime.util.logger.RayLog;
public abstract class RayBenchmarkTest<T> implements Serializable {
@@ -11,8 +11,8 @@ import org.junit.Test;
import org.ray.api.function.RayFunc0;
import org.ray.api.function.RayFunc1;
import org.ray.api.function.RayFunc3;
import org.ray.util.MethodId;
import org.ray.util.logger.RayLog;
import org.ray.runtime.util.MethodId;
import org.ray.runtime.util.logger.RayLog;
public class LambdaUtilsTest {
@@ -5,7 +5,7 @@ import java.lang.reflect.Executable;
import org.junit.Assert;
import org.junit.Test;
import org.ray.api.function.RayFunc2;
import org.ray.util.MethodId;
import org.ray.runtime.util.MethodId;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -4,7 +4,6 @@ import com.google.common.collect.ImmutableList;
import java.util.ArrayList;
import java.util.List;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ray.api.Ray;
@@ -12,7 +11,6 @@ import org.ray.api.RayObject;
import org.ray.api.WaitResult;
import org.ray.api.annotation.RayRemote;
import org.ray.api.id.UniqueId;
import org.ray.core.AbstractRayRuntime;
@RunWith(MyRunner.class)
@@ -3,7 +3,7 @@ package org.ray.api.test;
import org.junit.Assert;
import org.junit.Test;
import org.ray.api.annotation.RayRemote;
import org.ray.spi.model.RayActorMethods;
import org.ray.runtime.functionmanager.RayActorMethods;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -3,14 +3,13 @@ package org.ray.api.test;
import com.google.common.collect.ImmutableList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ray.api.Ray;
import org.ray.api.RayObject;
import org.ray.api.WaitResult;
import org.ray.util.logger.RayLog;
import org.ray.runtime.util.logger.RayLog;
/**
* Integration test for Ray.*
@@ -1,10 +1,9 @@
package org.ray.api.test;
import java.lang.reflect.Constructor;
import org.junit.Assert;
import org.junit.Test;
import org.ray.spi.model.RayMethod;
import org.ray.spi.model.RayTaskMethods;
import org.ray.runtime.functionmanager.RayMethod;
import org.ray.runtime.functionmanager.RayTaskMethods;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -2,7 +2,6 @@ package org.ray.api.test;
import com.google.common.collect.ImmutableList;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ray.api.Ray;
@@ -11,7 +10,6 @@ import org.ray.api.RayObject;
import org.ray.api.WaitResult;
import org.ray.api.annotation.RayRemote;
import org.ray.api.annotation.ResourceItem;
import org.ray.core.AbstractRayRuntime;
/**
* Resources Management Test.
@@ -7,7 +7,7 @@ import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ray.api.id.UniqueId;
import org.ray.core.UniqueIdHelper;
import org.ray.runtime.util.UniqueIdHelper;
@RunWith(MyRunner.class)
public class UniqueIdTest {
@@ -7,7 +7,7 @@ import org.junit.Assert;
import org.ray.api.Ray;
import org.ray.api.RayObject;
import org.ray.api.annotation.RayRemote;
import org.ray.util.FileUtil;
import org.ray.runtime.util.FileUtil;
/**
* given a directory of document files on each "machine", we would like to count the appearance of