Patch removes un-initialized and unused variables : fs_, debug_, debugFailEarly_, debugFailDuring_, debugFailLate_, jobLog_, log_, LOGNAME and mapredKey_.
If some debug statements are needed, we could add them as..
Two of the debug statements do not look relevant, so removed them. Replaced the other one with LOG.debug.
mapredKey_ is not set at all but referenced in getContext(). We need to set it appropriately.
The variable is never set from the first version. The next line in getContext() is adding last output. So, removed this.
Also removed new Date() from getContext(), because getContext() is called from log message and logger will anyway prefix the log with the current time.