There are specific derivatives of Configuration class that each read
certain *-site.xml files. This is because the XML files are service
specific.

Class 'JobConf' reads the mapred-site.xml, and class
'HdfsConfiguration' reads the hdfs-site.xml.

For the new MapReduce framework, class 'YarnConfiguration' reads the
yarn-site.xml.

On Sat, Sep 24, 2011 at 7:22 PM, Praveen Sripati
<praveensrip...@gmail.com> wrote:
> Hi,
>
> Where are the Hadoop configuration files (hdfs-*.xml and mapred-*.xml)  read
> in the code? In the org.apache.hadoop.conf.Configuration class, the
> following code is in the static block.
>
>    if(cL.getResource("hadoop-site.xml")!=null) {
>      LOG.warn("DEPRECATED: hadoop-site.xml found in the classpath. " +
>          "Usage of hadoop-site.xml is deprecated. Instead use
> core-site.xml, "
>          + "mapred-site.xml and hdfs-site.xml to override properties of " +
>          "core-default.xml, mapred-default.xml and hdfs-default.xml " +
>          "respectively");
>    }
>    addDefaultResource("core-default.xml");
>    addDefaultResource("core-site.xml");
>
> Thanks,
> Praveen
>



-- 
Harsh J

Reply via email to