hadoop配置文件

下面是几个重要的配置文件:

1、hadoop-env.sh

    这个文件主要是和jdk相关的PATH路径,需要注意的是,必须是当点节点的jdk路径,有可能master和slave上的jdk路径不是一样,在由scp复制到slave的时候注意master上的jdk路径和slave上的路径是否一致。

2、  core-sites.xml

 

1 <?xml version="1.0"?>
  2 <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
  3
  4 <!-- Put site-specific property overrides in this file. -->
  5
  6 <configuration>
  7         <property>
  8                 <name>fs.default.name</name>
  9                 <value>hdfs://master:9000</value>
 10         </property>
 11         <property>
 12                 <name>hadoop.tmp.dir</name>
 13                 <value>/home/xduser/hadoop-1.0.4/tmp</value>
 14         </property>
 15 </configuration>
其中tmp目录是自己手动建立的。
3、hdfs-site.xml

 1 <?xml version="1.0"?>
  2 <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
  3
  4 <!-- Put site-specific property overrides in this file. -->
  5
  6 <configuration>
  7         <property>
  8             <name>dfs.name.dir</name>
  9             <value>/home/xduser/name</value>
 10         </property>
 11         <property>
 12             <name>dfs.data.dir</name>
 13             <value>/home/xduser/data</value>
 14         </property>
 15         <property>
 16             <name>dfs.replication</name>
 17             <value>1</value>
 18         </property>
 19 </configuration>

4、mapred-site.xml

  1 <?xml version="1.0"?>
  2 <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
  3
  4 <!-- Put site-specific property overrides in this file. -->
  5
  6 <configuration>
  7         <property>
  8             <name>mapred.job.tracker</name>
  9             <value>http://192.168.5.154:9001</value>
 10         </property>
 11         <property>
 12             <name>mapred.child.java.opts</name>
 13             <value>-Xmx1200</value>
 14          </property>
 15 </configuration>
~

上面是我成功的配置文件的信息,根据自己情况需要修改的有IP和用户名


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值