Description
In such corner cases, clients can see that the job has become successful but they cannot get any information from JobHistoryServer. And there is no means of figuring out what happened in the system except from the AM logs.
Ideally we should set the JobState to become SUCCESS as the last step, once everything else is done. The code changes may be a bit complicated to achieve this, but we can investigate and see.