Fix HDFSLocation cannot rename issue.
Code refactoring.
Capture container exit status. Use it to release pending futures.