[ 
https://issues.apache.org/jira/browse/HDFS-1418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12915107#action_12915107
 ] 

Ranjit Mathew commented on HDFS-1418:
-------------------------------------

Since Java evaluates the second argument to {{conf.get()}} before calling it, 
the warning message is still emitted (I checked this).

The {{Configuration.get()}} method automatically fetches 
{{mapreduce.task.attempt.id}} when you try to get {{mapred.task.id}}.
See {{addDeprecatedKeys()}} in 
{{src/java/org/apache/hadoop/mapreduce/util/ConfigUtil.java}} in the MapReduce 
code-base and
{{get()}} and {{handleDeprecation()}} in 
{{src/java/org/apache/hadoop/conf/Configuration.java}} in the Common code-base.

> DFSClient Uses Deprecated "mapred.task.id" Configuration Key Causing 
> Unecessary Warning Messages
> ------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-1418
>                 URL: https://issues.apache.org/jira/browse/HDFS-1418
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs client
>    Affects Versions: 0.22.0
>            Reporter: Ranjit Mathew
>            Priority: Minor
>         Attachments: HDFS-1418.patch
>
>
> Every invocation of the "hadoop fs" command leads to an unnecessary warning 
> like the following:
> {noformat}
> $ $HADOOP_HOME/bin/hadoop fs -ls /
> 10/09/24 15:10:23 WARN conf.Configuration: mapred.task.id is deprecated. 
> Instead, use mapreduce.task.attempt.id
> {noformat}
> This is easily fixed by updating 
> "src/java/org/apache/hadoop/hdfs/DFSClient.java".

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