hadoop单机版安装的配置文件们

Hadoop单机版安装调试
本文介绍了解决Hadoop单机版安装过程中datanode无法启动的问题的方法。包括删除hdfs目录下的data和name文件夹,使用hadoop namenode格式化,以及配置core-site.xml、mapred-site.xml和hdfs-site.xml等关键步骤。

 
hadoop单机版安装时,如果datanode没有激动起来,可以按照以下步骤操作,然后重新启动。

把你hdfs文件夹中的data和name两个文件夹删掉,然后$hadoop namenode -format一下,再启动。

core-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>fs.default.name</name>
  9               <value>hdfs://172.16.48.203:9000</value>
 10                 </property>
 11 
 12  <property>
 13      <name>hadoop.tmp.dir</name>
 14      <value>/opt/hadoop-1.0.4/tmp</value>
 15  </property>
 16 </configuration>
                          

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>172.16.48.203:9001</value>
 10                         </property>
 11                         </configuration>

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>/opt/hadoop-1.0.4/name</value>
 10                         </property>
 11 
 12                             <property>
 13                                     <name>dfs.data.dir</name>
 14                                             <value>/opt/hadoop-1.0.4/data</value>
 15                                                 </property>
 16 
 17                                                     <property>
 18                                                             <name>dfs.replication</name    >
 19                                                                     <value>1</value>
 20                                                                         </property>
 21 <property>
 22         <name>dfs.datanode.max.xcievers</name>
 23                 <value>4096</value>
 24                 </property>
 25                                                                         </configuration    >


slaves
  1 172.16.48.203
master

  1 localhost
/etc/hosts

  1 172.16.48.203   sg203   localhost # Added by NetworkManager
  2 #127.0.0.1      localhost.localdomain   localhost
  3 ::1     sg203   localhost6.localdomain6 localhost6








评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值