Fix shutdown hook in worker mode (#8098)

This commit is contained in:
Kai Yang
2020-05-26 15:23:44 +08:00
committed by GitHub
parent f39760a4d3
commit 26cffb9c7c
@@ -102,12 +102,14 @@ public final class RayNativeRuntime extends AbstractRayRuntime {
@Override
public void shutdown() {
nativeShutdown();
if (null != manager) {
manager.cleanup();
manager = null;
if (rayConfig.workerMode == WorkerType.DRIVER) {
nativeShutdown();
if (null != manager) {
manager.cleanup();
manager = null;
}
RayConfig.reset();
}
RayConfig.reset();
LOGGER.info("RayNativeRuntime shutdown");
}