void internalReleaseLease ( Lease lease , String src , INodeFileUnderConstruction pendingFile ) throws IOException { if ( lease . hasPath ( ) ) { // make a copy of the paths because internalReleaseLeaseOne removes // pathnames from the lease record. String [ ] leasePaths = new String [ lease . getPaths ( ) . size ( ) ] ; lease . getPaths ( ) . toArray ( leasePaths ) ; LOG . info ( "Recovering lease: " + lease + " for paths " + Arrays . toString ( leasePaths ) ) ; for ( String p : leasePaths ) { internalReleaseLeaseOne ( lease , p ) ; } } else { internalReleaseLeaseOne ( lease , src , pendingFile , false ) ; } }
This is invoked when a lease expires . On lease expiry all the files that were written from that dfsclient should be recovered .