@ Override public boolean releaseTaskManager ( final ResourceID resourceId , final Exception cause ) { componentMainThreadExecutor . assertRunningInMainThread ( ) ; if ( registeredTaskManagers . remove ( resourceId ) ) { releaseTaskManagerInternal ( resourceId , cause ) ; return true ; } else { return false ; } }
Unregister TaskManager from this pool all the related slots will be released and tasks be canceled . Called when we find some TaskManager becomes dead or abnormal and we decide to not using slots from it anymore .