mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 02:30:34 +08:00
Add a flag to disable reconstruction for a killed actor (#7346)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package org.ray.runtime;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import org.ray.api.RayActor;
|
||||
import org.ray.api.id.JobId;
|
||||
import org.ray.api.id.UniqueId;
|
||||
@@ -50,7 +49,7 @@ public class RayDevRuntime extends AbstractRayRuntime {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void killActor(RayActor<?> actor) {
|
||||
public void killActor(RayActor<?> actor, boolean noReconstruction) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
@@ -139,8 +139,8 @@ public class RayMultiWorkerNativeRuntime implements RayRuntime {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void killActor(RayActor<?> actor) {
|
||||
getCurrentRuntime().killActor(actor);
|
||||
public void killActor(RayActor<?> actor, boolean noReconstruction) {
|
||||
getCurrentRuntime().killActor(actor, noReconstruction);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -135,8 +135,8 @@ public final class RayNativeRuntime extends AbstractRayRuntime {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void killActor(RayActor<?> actor) {
|
||||
nativeKillActor(nativeCoreWorkerPointer, actor.getId().getBytes());
|
||||
public void killActor(RayActor<?> actor, boolean noReconstruction) {
|
||||
nativeKillActor(nativeCoreWorkerPointer, actor.getId().getBytes(), noReconstruction);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -200,5 +200,6 @@ public final class RayNativeRuntime extends AbstractRayRuntime {
|
||||
private static native void nativeSetResource(long conn, String resourceName, double capacity,
|
||||
byte[] nodeId);
|
||||
|
||||
private static native void nativeKillActor(long nativeCoreWorkerPointer, byte[] actorId);
|
||||
private static native void nativeKillActor(long nativeCoreWorkerPointer, byte[] actorId,
|
||||
boolean noReconstruction);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user