public void stopLeaseMonitor ( ) throws InterruptedException { if ( lmmonitor != null ) { lmmonitor . stop ( ) ; InjectionHandler . processEvent ( InjectionEvent . FSNAMESYSTEM_STOP_LEASEMANAGER ) ; } if ( lmthread != null ) { // interrupt the lease monitor thread. We need to make sure the // interruption does not happen during // LeaseManager.checkLeases(), which would possibly interfere with writing // to edit log, and hence with clean shutdown. It essential during // failover, as it could exclude edit log streams!!! writeLock ( ) ; try { lmthread . interrupt ( ) ; } finally { writeUnlock ( ) ; } lmthread . join ( ) ; } }
Stops lease monitor thread .