Refactor Hadoop job completion.