mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 23:08:32 +08:00
Add dynamic worker options for worker command. (#4970)
* Add fields for fbs * WIP * Fix complition errors * Add java part * FIx * Fix * Fix * Fix lint * Refine API * address comments and add test * Fix * Address comment. * Address comments. * Fix linting * Refine * Fix lint * WIP: address comment. * Fix java * Fix py * Refin * Fix * Fix * Fix linting * Fix lint * Address comments * WIP * Fix * Fix * minor refine * Fix lint * Fix raylet test. * Fix lint * Update src/ray/raylet/worker_pool.h Co-Authored-By: Hao Chen <chenh1024@gmail.com> * Update java/runtime/src/main/java/org/ray/runtime/AbstractRayRuntime.java Co-Authored-By: Hao Chen <chenh1024@gmail.com> * Address comments. * Address comments. * Fix test. * Update src/ray/raylet/worker_pool.h Co-Authored-By: Hao Chen <chenh1024@gmail.com> * Address comments. * Address comments. * Fix * Fix lint * Fix lint * Fix * Address comments. * Fix linting
This commit is contained in:
@@ -13,9 +13,14 @@ public class ActorCreationOptions extends BaseTaskOptions {
|
||||
|
||||
public final int maxReconstructions;
|
||||
|
||||
private ActorCreationOptions(Map<String, Double> resources, int maxReconstructions) {
|
||||
public final String jvmOptions;
|
||||
|
||||
private ActorCreationOptions(Map<String, Double> resources,
|
||||
int maxReconstructions,
|
||||
String jvmOptions) {
|
||||
super(resources);
|
||||
this.maxReconstructions = maxReconstructions;
|
||||
this.jvmOptions = jvmOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -25,6 +30,7 @@ public class ActorCreationOptions extends BaseTaskOptions {
|
||||
|
||||
private Map<String, Double> resources = new HashMap<>();
|
||||
private int maxReconstructions = NO_RECONSTRUCTION;
|
||||
private String jvmOptions = "";
|
||||
|
||||
public Builder setResources(Map<String, Double> resources) {
|
||||
this.resources = resources;
|
||||
@@ -36,8 +42,13 @@ public class ActorCreationOptions extends BaseTaskOptions {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setJvmOptions(String jvmOptions) {
|
||||
this.jvmOptions = jvmOptions;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ActorCreationOptions createActorCreationOptions() {
|
||||
return new ActorCreationOptions(resources, maxReconstructions);
|
||||
return new ActorCreationOptions(resources, maxReconstructions, jvmOptions);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user