Revert "Updating zero capacity resource semantics (#4555)"

This reverts commit 0f42f87ebc.
This commit is contained in:
Devin Petersohn
2019-04-18 11:16:15 -07:00
parent 8f37d49b8b
commit 618147f57f
17 changed files with 193 additions and 248 deletions
@@ -7,19 +7,13 @@ import java.util.Map;
* The options class for RayCall or ActorCreation.
*/
public abstract class BaseTaskOptions {
public final Map<String, Double> resources;
public Map<String, Double> resources;
public BaseTaskOptions() {
resources = new HashMap<>();
}
public BaseTaskOptions(Map<String, Double> resources) {
for (Map.Entry<String, Double> entry : resources.entrySet()) {
if (entry.getValue().compareTo(0.0) <= 0) {
throw new IllegalArgumentException(String.format("Resource capacity should be " +
"positive, but got resource %s = %f.", entry.getKey(), entry.getValue()));
}
}
this.resources = resources;
}