mirror of
https://github.com/wassname/ray.git
synced 2026-07-04 12:31:00 +08:00
[Java] New Java actor API (#7414)
This commit is contained in:
-2
@@ -6,7 +6,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import org.msgpack.core.Preconditions;
|
||||
import org.ray.api.annotation.RayRemote;
|
||||
import org.ray.streaming.api.context.StreamingContext;
|
||||
import org.ray.streaming.python.PythonFunction;
|
||||
import org.ray.streaming.python.PythonPartition;
|
||||
@@ -24,7 +23,6 @@ import org.slf4j.LoggerFactory;
|
||||
* `streaming/python/runtime/gateway_client.py`
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@RayRemote
|
||||
public class PythonGateway {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(PythonGateway.class);
|
||||
private static final String REFERENCE_ID_PREFIX = "__gateway_reference_id__";
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ public class JobSchedulerImpl implements JobScheduler {
|
||||
switch (executionNode.getLanguage()) {
|
||||
case JAVA:
|
||||
RayActor<JobWorker> jobWorker = (RayActor<JobWorker>) worker;
|
||||
waits.add(Ray.call(JobWorker::init, jobWorker,
|
||||
waits.add(jobWorker.call(JobWorker::init,
|
||||
new WorkerContext(taskId, executionGraph, jobConfig)));
|
||||
break;
|
||||
case PYTHON:
|
||||
|
||||
-2
@@ -4,7 +4,6 @@ import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
import org.ray.api.Ray;
|
||||
import org.ray.api.annotation.RayRemote;
|
||||
import org.ray.runtime.RayMultiWorkerNativeRuntime;
|
||||
import org.ray.runtime.functionmanager.JavaFunctionDescriptor;
|
||||
import org.ray.streaming.runtime.core.graph.ExecutionGraph;
|
||||
@@ -28,7 +27,6 @@ import org.slf4j.LoggerFactory;
|
||||
/**
|
||||
* The stream job worker, it is a ray actor.
|
||||
*/
|
||||
@RayRemote
|
||||
public class JobWorker implements Serializable {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(JobWorker.class);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user