[ 
https://issues.apache.org/jira/browse/MAPREDUCE-1864?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Amareshwari Sriramadasu updated MAPREDUCE-1864:
-----------------------------------------------

    Attachment: patch-1864.txt

Patch removes un-initialized and unused variables : fs_, debug_, 
debugFailEarly_, debugFailDuring_, debugFailLate_, jobLog_, log_, LOGNAME and 
mapredKey_.

bq. 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. 

bq.  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. 

> PipeMapRed.java has uninitialized members log_ and LOGNAME 
> -----------------------------------------------------------
>
>                 Key: MAPREDUCE-1864
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1864
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: contrib/streaming
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>             Fix For: 0.22.0
>
>         Attachments: patch-1864.txt
>
>
> PipeMapRed.java has members log_ and LOGNAME, which are never initialized and 
> they are used in code for logging in several places. 
> They should be removed and PipeMapRed should use commons LogFactory and Log 
> for logging. This would improve code maintainability.
> Also, as per [comment | 
> https://issues.apache.org/jira/browse/MAPREDUCE-1851?focusedCommentId=12878530&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_12878530],
>  stream.joblog_ configuration property can be removed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to