/** * Called from {@link org.apache.flink.runtime.instance.SharedSlot#releaseSlot()}. * * @param sharedSlot The slot to be released. */ void releaseSharedSlot(SharedSlot sharedSlot) { synchronized (lock) { if (sharedSlot.markCancelled()) { // we are releasing this slot if (sharedSlot.hasChildren()) { // by simply releasing all children, we should eventually release this slot. Set<Slot> children = sharedSlot.getSubSlots(); while (children.size() > 0) { children.iterator().next().releaseSlot(); } } else { // if there are no children that trigger the release, we trigger it directly internalDisposeEmptySharedSlot(sharedSlot); } } } }
/** * Called from {@link org.apache.flink.runtime.instance.SharedSlot#releaseSlot(Throwable)}. * * @param sharedSlot The slot to be released. */ void releaseSharedSlot(SharedSlot sharedSlot) { synchronized (lock) { if (sharedSlot.markCancelled()) { // we are releasing this slot if (sharedSlot.hasChildren()) { final FlinkException cause = new FlinkException("Releasing shared slot parent."); // by simply releasing all children, we should eventually release this slot. Set<Slot> children = sharedSlot.getSubSlots(); while (children.size() > 0) { children.iterator().next().releaseSlot(cause); } } else { // if there are no children that trigger the release, we trigger it directly internalDisposeEmptySharedSlot(sharedSlot); } } } }
/** * Called from {@link org.apache.flink.runtime.instance.SharedSlot#releaseSlot(Throwable)}. * * @param sharedSlot The slot to be released. */ void releaseSharedSlot(SharedSlot sharedSlot) { synchronized (lock) { if (sharedSlot.markCancelled()) { // we are releasing this slot if (sharedSlot.hasChildren()) { final FlinkException cause = new FlinkException("Releasing shared slot parent."); // by simply releasing all children, we should eventually release this slot. Set<Slot> children = sharedSlot.getSubSlots(); while (children.size() > 0) { children.iterator().next().releaseSlot(cause); } } else { // if there are no children that trigger the release, we trigger it directly internalDisposeEmptySharedSlot(sharedSlot); } } } }
/** * Called from {@link org.apache.flink.runtime.instance.SharedSlot#releaseSlot(Throwable)}. * * @param sharedSlot The slot to be released. */ void releaseSharedSlot(SharedSlot sharedSlot) { synchronized (lock) { if (sharedSlot.markCancelled()) { // we are releasing this slot if (sharedSlot.hasChildren()) { final FlinkException cause = new FlinkException("Releasing shared slot parent."); // by simply releasing all children, we should eventually release this slot. Set<Slot> children = sharedSlot.getSubSlots(); while (children.size() > 0) { children.iterator().next().releaseSlot(cause); } } else { // if there are no children that trigger the release, we trigger it directly internalDisposeEmptySharedSlot(sharedSlot); } } } }
parent.markCancelled(); internalDisposeEmptySharedSlot(parent);
parent.markCancelled(); internalDisposeEmptySharedSlot(parent);
parent.markCancelled(); internalDisposeEmptySharedSlot(parent);
parent.markCancelled(); internalDisposeEmptySharedSlot(parent);
parent.markCancelled(); internalDisposeEmptySharedSlot(parent);
parent.markCancelled(); internalDisposeEmptySharedSlot(parent);
parent.markCancelled(); internalDisposeEmptySharedSlot(parent);
parent.markCancelled(); internalDisposeEmptySharedSlot(parent);