Description
DFSOutputStream#close has a loop where it tries to contact the NameNode, to call complete on the file which is open-for-write. This loop includes a sleep which increases exponentially (exponential backoff). It makes sense to sleep before re-contacting the NameNode, but the code also sleeps even in the case where it has already decided to give up and throw an exception back to the user. It should not sleep after it has already decided to give up, since there's no point.