FreeBSD下安装配置Hadoop集群(三)(2)

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>
    <property>
        <name>mapred.job.tracker</name>
        <value>hadoopmaster-177.tj:9001</value>
    </property>
    <property>
        <name>mapred.local.dir</name>
        <value>/opt/data/hadoop/mapred/mrlocal,/opt/data/hadoop1/mapred/mrlocal,/opt/data/hadoop2/mapred/mrlocal,/opt/data/hadoop3/mapred/mrlocal,/opt/data/hadoop4/mapred/mrlocal</v
alue>
        <final>true</final>
    </property>
    <property>
        <name>mapred.system.dir</name>
        <value>/opt/data/hadoop1/mapred/mrsystem</value>
        <final>true</final>
    </property>
    <property>
        <name>mapred.tasktracker.map.tasks.maximum</name>
        <value>12</value>
<!--定义该datanode的map槽位-->
        <final>true</final>
    </property>
    <property>
        <name>mapred.tasktracker.reduce.tasks.maximum</name>
        <value>4</value>
<!--定义该datanode的reduce槽位-->
        <final>true</final>
    </property>
    <property>
        <name>mapred.map.child.Java.opts</name>
        <value>-Xmx1224M</value>
<!--map的java虚拟机的内存占用-->
    </property>
    <property>
        <name>mapred.reduce.child.java.opts</name>
        <value>-Xmx2048M</value>
<!--reduce的虚拟机内存占用-->
    </property>
    <property>
        <name>mapred.reduce.parallel.copies</name>
        <value>10</value>
    </property>
    <property>
        <name>io.sort.factor</name>
        <value>100</value>
    </property>
    <property>
        <name>mapred.job.reduce.input.buffer.percent</name>
        <value>0.3</value>
    </property>
    <property>
        <name>mapred.compress.map.output</name>
        <value>true</value>
<!--使用压缩格式输出map结果-->
    </property>
    <property>
        <name>mapred.map.output.compression.codec</name>
        <value>com.hadoop.compression.lzo.LzoCodec</value>
<!--压缩所采用的格式-->
    </property>
    <property>
        <name>mapred.child.java.opts</name>
        <value>-Djava.library.path=/opt/hadoopgpl/native/Linux-amd64-64</value>
<!--压缩输出的保证,hadoopgpl,超重要-->
    </property>
    <property>
        <name>io.sort.mb</name>
        <value>600</value>
    </property>
    <property>
        <name>fs.inmemory.size.mb</name>
        <value>500</value>
    </property>
</configuration>



然后需要在Datanode的/etc/hosts文件里写上自身和NameNode的主机名与IP

例如:


namenode01 192.168.1.2

datanode01 192.168.1.10


内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/b6ad0f3212090a493634a850e132b0dd.html