码迷,mamicode.com
首页 > 其他好文 > 详细

hadoop2.0安装和配置

时间:2015-09-20 17:43:16      阅读:222      评论:0      收藏:0      [点我收藏+]

标签:

hadoop2与hadoop1的配置有些许不同,最主要的是hadoop1里的master变成了yarn

这篇文直接从hadoop的配置开始,因为系统环境和jdk和hadoop1都是一样的。

hadoop1的配置链接,从第六步开始

六、设置hadoop2参数

进入 usr/local/hadoop/etc/hadoop 文件夹,即可看到以下文件

6.1配置hadoop-env.sh
 
找到export JAVA_HOME这一行,去除前面的#号注释符。
修改 export JAVA_HOME=/usr/local/jdk1.6.0_30
 
6.2配置core-site.xml
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://hadoop100:8020</value>
 <final>true</final>
 </property>
<property>
 <name>hadoop.tmp.dir</name>
<value>/home/hadoop/tmphadoop2.0</value>
</property>
</configuration>

6.3配置hdfs-site.xml

<configuration>
<property>
<name>dfs.namenode.name.dir</name>
<value>/home/hadoop/tmphadoop2.0/dfs/name</value>
 <final>true</final>
</property>
 <property>
 <name>dfs.datanode.data.dir</name>
<value>/home/hadoop/tmphadoop2.0/dfs/data</value>
<description>Determines where on the local filesystem an DFS data node
should store its blocks. If this is a comma-delimited list of
directories, then data will be stored in all named directories,
typically on different devices. Directories that do not exist are
ignored. </description> 
<final>true</final> 
</property>
 <property>
<name>dfs.replication</name> <value>1</value>
 </property>
 <property>
<name>dfs.permissions</name> <value>false</value>
 </property>

</configuration>

6.4:配置mapred-site.xml

<configuration>
<property>
<name>mapreduce.framework.name</name> 
<value>yarn</value>
 </property>
</configuration>

6.5配置yarn-site.xml

<?xml version="1.0"?>
<configuration>

<!-- Site specific YARN configuration properties -->
<property>
  <name>yarn.resourcemanager.address</name>
  <value>hadoop100:8032</value>
</property>

<property>
  <name>yarn.resourcemanager.scheduler.address</name>
  <value>hadoop100:8030</value>
</property>

<property>
  <name>yarn.resourcemanager.resource-tracker.address</name>
  <value>hadoop100:8031</value>
</property>

<property>
  <name>yarn.resourcemanager.admin.address</name>
  <value>hadoop100:8033</value>
</property>

<property>
  <name>yarn.resourcemanager.webapp.address</name>
  <value>hadoop100:8088</value>
</property>

<property> 
    <name>yarn.nodemanager.aux-services</name> 
        <value>mapreduce.shuffle</value> 
        </property> 
         
<property> 
    <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name> 
        <value>org.apache.hadoop.mapred.ShuffleHandler</value> 
        </property> 

</configuration>

6.6配置slaves

hadoop101
hadoop102

其他的和hadoop1都是一样的,这里就不在详述

 

 

 

 

 

hadoop2.0安装和配置

标签:

原文地址:http://www.cnblogs.com/arbitrary/p/4823699.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!