首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

hadoop伪分布式配备

2012-07-22 
hadoop伪分布式配置修改core-site.xml?xml version1.0??xml-stylesheet typetext/xsl hrefconf

hadoop伪分布式配置

修改core-site.xml

<?xml version="1.0"?>

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

?

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

?

<configuration>

? ? <property>?

? ? ? ? <name>fs.default.name</name>?

? ? ? ? <value>hdfs://localhost/</value>

? ? </property>

</configuration>

?

修改hdfs-site.xml

<?xml version="1.0"?>

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

?

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

?

<configuration>

? ? <property>?

? ? ? ? <name>dfs.replication</name>

? ? ? ? <value>1</value>

? ? </property>

</configuration>

?

修改mapred-site.xml

<?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>localhost:8021</value>

? ? </property>

</configuration>

?

然后将SSH设置成不用输入密码就能登录:

ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

测试修改是否生效:

ssh localhost

?

格式化HDFS:

hadoop namenode -format

?

启动HDFS和MapReduce

start-dfs.sh

start-mapred.sh

验证HDFS是否启动成功:

http://localhost:50070/

?

验证MapReduce是否启动成功:

http://localhost:50030/

?

也可查看后台进程,如果namenode,secondary namenode,datanode.这3个进程表示HDFS启动成功,如果有JobTracker和TaskTracker进程表示MapReduce启动成功

?

?

?

?

?

热点排行