This is a very simple patch that renews leases only when pendingCreates is not empty.
This prevents the client from sending lease renewal messages when the client
is not writing into dfs, say just reading or doing local stuff.
This should make the name node less busy.
I tried to change the ipc.client.timeout from 60 secs to 20 secs.
On my 3 node cluster everything worked fine.
On a large cluster the timeout was changed only for the DFSClient.
The LeaseExpiredException does not appear anymore.
But we need more statistics on that, especially with slower networks.
The ipc timeout is global for all ipc connections, so if we make it
smaller there is a risk that long lasting operations like block transfers
will start to timeout. I haven't seen it.
If anybody is willing to try 20 sec ipc timeout please post the results.
Failing early, and retrying might make things faster in general.