Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/4887#discussion_r148552792
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
---
@@ -874,6 +894,13 @@ public void handleError(final Exception exception) {
*/
public abstract boolean stopWorker(ResourceID resourceID);
+ /**
+ * Cancel the allocation of a resource. If the resource allocation has
not fulfilled, should cancel it.
+ *
+ * @param resourceProfile The resource description of the previous
allocation
+ */
+ public abstract void cancelNewWorker(ResourceProfile resourceProfile);
--- End diff --
See my comment in the `SlotManager`. I think we don't need this call here.
Rather, I would like the SlotManager to decide upon registration of a new
resource whether it needs it or not and release the resource via calling
`ResourceManagerActions#releaseResource`.
---