【问题标题】:Use of core-site.xml in mapreduce programmapreduce程序中core-site.xml的使用
【发布时间】:2015-06-14 15:09:13
【问题描述】:

我已经看到 mapreduce 程序使用/添加 core-site.xml 作为程序中的资源。什么是 core-site.xml 或如何在 mapreduce 程序中使用?

【问题讨论】:

    标签: hadoop mapreduce bigdata


    【解决方案1】:

    来自documentation, 除非明确关闭,Hadoop 默认指定两个资源,从类路径按顺序加载:

    core-default.xml : hadoop 的只读默认值, core-site.xml:给定 hadoop 安装的站点特定配置

    Configuration config = new Configuration();
    config.addResource(new Path("/user/hadoop/core-site.xml")); 
    config.addResource(new Path("/user/hadoop/hdfs-site.xml")); 
    

    【讨论】:

      【解决方案2】:

      Core-site.xml 和 HDFS-site.xml 将表示 hadoop 及其 hdfs,以便您的 mapreduce 程序将找出要指出的集群以及要执行的位置..

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-11-07
        • 1970-01-01
        • 2017-12-22
        • 2017-05-20
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多