mirror of
https://github.com/wassname/ray.git
synced 2026-07-17 11:32:33 +08:00
[Placement Group]Enhance create placement group java api (#11702)
* enhance create pg java api * add state for PlacementGroup * fix comment * move default pg * make default pg name private * add bundle size and bundle resource size check when placement group create
This commit is contained in:
@@ -245,10 +245,16 @@ public final class Ray extends RayCall {
|
||||
* to be updated and rescheduled.
|
||||
* This function only works when gcs actor manager is turned on.
|
||||
*
|
||||
* @param bundles Preallocated resource list.
|
||||
* @param name Name of the Placement Group.
|
||||
* @param bundles Pre-allocated resource list.
|
||||
* @param strategy Actor placement strategy.
|
||||
* @return A handle to the created placement group.
|
||||
*/
|
||||
public static PlacementGroup createPlacementGroup(String name,
|
||||
List<Map<String, Double>> bundles, PlacementStrategy strategy) {
|
||||
return internal().createPlacementGroup(name, bundles, strategy);
|
||||
}
|
||||
|
||||
public static PlacementGroup createPlacementGroup(List<Map<String, Double>> bundles,
|
||||
PlacementStrategy strategy) {
|
||||
return internal().createPlacementGroup(bundles, strategy);
|
||||
|
||||
@@ -169,6 +169,9 @@ public interface RayRuntime {
|
||||
PyActorHandle createActor(PyActorClass pyActorClass, Object[] args,
|
||||
ActorCreationOptions options);
|
||||
|
||||
PlacementGroup createPlacementGroup(String name, List<Map<String, Double>> bundles,
|
||||
PlacementStrategy strategy);
|
||||
|
||||
PlacementGroup createPlacementGroup(List<Map<String, Double>> bundles,
|
||||
PlacementStrategy strategy);
|
||||
|
||||
@@ -198,4 +201,5 @@ public interface RayRuntime {
|
||||
* Intentionally exit the current actor.
|
||||
*/
|
||||
void exitActor();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user