Add a flag to disable reconstruction for a killed actor (#7346)

This commit is contained in:
Kai Yang
2020-03-13 19:10:21 +08:00
committed by GitHub
parent 575c89cf47
commit d6e8f47065
17 changed files with 135 additions and 52 deletions
@@ -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);
}