public void nodeAppRemoved ( String nodeName , ResourceType type ) { Set < String > sessions = nodeManager . getNodeSessions ( nodeName ) ; Set < ClusterNode . GrantId > grantsToRevoke = nodeManager . deleteAppFromNode ( nodeName , type ) ; if ( grantsToRevoke == null ) { return ; } Set < String > affectedSessions = new HashSet < String > ( ) ; for ( String sessionHandle : sessions ) { try { if ( sessionManager . getSession ( sessionHandle ) . getTypes ( ) . contains ( type ) ) { affectedSessions . add ( sessionHandle ) ; } } catch ( InvalidSessionHandle ex ) { // ignore LOG . warn ( "Found invalid session: " + sessionHandle + " while timing out node: " + nodeName ) ; } } handleDeadNode ( nodeName , affectedSessions ) ; handleRevokedGrants ( nodeName , grantsToRevoke ) ; scheduler . notifyScheduler ( ) ; }
This is an internal api called to tell the cluster manager that a particular type of resource is no longer available on a node .