From 456d08ad407e1e1a023cdd1acc189c50b99a1d54 Mon Sep 17 00:00:00 2001 From: fangfengbin <869218239a@zju.edu.cn> Date: Sat, 2 Jan 2021 12:17:45 +0800 Subject: [PATCH] Deprecate setResource java api (#13117) --- java/api/src/main/java/io/ray/api/Ray.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/java/api/src/main/java/io/ray/api/Ray.java b/java/api/src/main/java/io/ray/api/Ray.java index 3100d60a1..02ffc59c8 100644 --- a/java/api/src/main/java/io/ray/api/Ray.java +++ b/java/api/src/main/java/io/ray/api/Ray.java @@ -200,12 +200,26 @@ public final class Ray extends RayCall { return runtime; } - /** Update the resource for the specified client. Set the resource for the specific node. */ + /** + * Update the resource for the specified client. Set the resource for the specific node. + * + * @deprecated Consider using placement groups instead + * (docs.ray.io/en/master/placement-group.html). You can also specify resources at Ray start + * time with the 'resources' field in the cluster autoscaler. + */ + @Deprecated public static void setResource(UniqueId nodeId, String resourceName, double capacity) { internal().setResource(resourceName, capacity, nodeId); } - /** Set the resource for local node. */ + /** + * Set the resource for local node. + * + * @deprecated Consider using placement groups instead + * (docs.ray.io/en/master/placement-group.html). You can also specify resources at Ray start + * time with the 'resources' field in the cluster autoscaler. + */ + @Deprecated public static void setResource(String resourceName, double capacity) { internal().setResource(resourceName, capacity, UniqueId.NIL); }