mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 19:33:06 +08:00
[Java] Implement missing methods in MockRayletClient (#2954)
Previous changes broke single-process mode in raylet. This PR fixes the hello-world example work in single-process mode. Follow-up diffs will completely fix single-process mode and add tests.
This commit is contained in:
committed by
Robert Nishihara
parent
39b4a89fde
commit
3cccb49191
@@ -1,5 +1,6 @@
|
||||
package org.ray.runtime.raylet;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@@ -82,12 +83,15 @@ public class MockRayletClient implements RayletClient {
|
||||
|
||||
@Override
|
||||
public UniqueId generateTaskId(UniqueId driverId, UniqueId parentTaskId, int taskIndex) {
|
||||
throw new RuntimeException("Not implemented here.");
|
||||
return UniqueId.randomId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> WaitResult<T> wait(List<RayObject<T>> waitFor, int numReturns, int timeoutMs) {
|
||||
throw new RuntimeException("Not implemented here.");
|
||||
return new WaitResult<T>(
|
||||
waitFor,
|
||||
ImmutableList.of()
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user