flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/Dispatcher.java
/**
	 * Callback method when current resourceManager loses leadership.
	 */
Callback method when current resourceManager loses leadership.
Callback method when current resourceManager loses leadership .
@Override
	public void revokeLeadership() {
		runAsyncWithoutFencing(
			() -> {
				log.info("Dispatcher {} was revoked leadership.", getAddress());
				try {
					clearState();
				} catch (Exception e) {
					log.warn("Could not properly clear the Dispatcher state while revoking leadership.", e);
				}
				setFencingToken(null);
			});
	}
@ Override public void revokeLeadership ( ) { runAsyncWithoutFencing ( ( ) -> { log . info ( "Dispatcher {} was revoked leadership." , getAddress ( ) ) ; try { clearState ( ) ; } catch ( Exception e ) { log . warn ( "Could not properly clear the Dispatcher state while revoking leadership." , e ) ; } setFencingToken ( null ) ; } ) ; }
Callback method when current resourceManager loses leadership.
Callback method when current resourceManager loses leadership .
// clear the fencing token indicating that we don't have the leadership right now