hadoop集群搭建(hadoop)

配置ssh无需密码登陆:


我用的hadoop版本是hadoop-0.20.2 下载地址:

   [root@localhostconf]# vim core-site.xml 

[root@localhostconf]# vim mapred-site.xml 

[root@localhostconf]# vim hdfs-site.xml

[root@localhostconf]# vim masters 

[root@localhostconf]# vim slaves 

一共编辑了5个文件,具体意义代表什么,之后会讲到

这里注意要被指/etc/hosts文件,如下(192.168.30.149):

         [root@localhostconf]# vim /etc/hosts

 


4.启动hadoop:

这里用简单的命令进行启动,

         A.格式化文件系统:                 

         B.启动hadoop                 

         C.利用hadoop自带的例子测试hadoop是否启动成功                  

11/12/02 17:47:14 INFOinput.FileInputFormat: Total input paths to process : 1

11/12/02 17:47:14 INFO mapred.JobClient:Running job: job_201112021743_0001

11/12/02 17:47:15 INFOmapred.JobClient:  map 0% reduce 0%

11/12/02 17:47:22 INFOmapred.JobClient:  map 100% reduce 0%

11/12/02 17:47:34 INFOmapred.JobClient:  map 100% reduce 100%

11/12/02 17:47:36 INFO mapred.JobClient:Job complete: job_201112021743_0001

11/12/02 17:47:36 INFO mapred.JobClient:Counters: 17

11/12/02 17:47:36 INFOmapred.JobClient:   Job Counters

11/12/02 17:47:36 INFOmapred.JobClient:     Launched reducetasks=1

11/12/02 17:47:36 INFOmapred.JobClient:     Launched maptasks=1

11/12/02 17:47:36 INFOmapred.JobClient:     Data-local maptasks=1

11/12/02 17:47:36 INFOmapred.JobClient:   FileSystemCounters

11/12/02 17:47:36 INFOmapred.JobClient:    FILE_BYTES_READ=32523

11/12/02 17:47:36 INFOmapred.JobClient:    HDFS_BYTES_READ=44253

11/12/02 17:47:36 INFOmapred.JobClient:    FILE_BYTES_WRITTEN=65078

11/12/02 17:47:36 INFOmapred.JobClient:    HDFS_BYTES_WRITTEN=23148

11/12/02 17:47:36 INFOmapred.JobClient:   Map-Reduce Framework

11/12/02 17:47:36 INFOmapred.JobClient:     Reduce inputgroups=2367

11/12/02 17:47:36 INFOmapred.JobClient:     Combine outputrecords=2367

11/12/02 17:47:36 INFOmapred.JobClient:     Map inputrecords=734

11/12/02 17:47:36 INFOmapred.JobClient:     Reduce shufflebytes=32523

11/12/02 17:47:36 INFOmapred.JobClient:     Reduce outputrecords=2367

11/12/02 17:47:36 INFO mapred.JobClient:     Spilled Records=4734

11/12/02 17:47:36 INFOmapred.JobClient:     Map outputbytes=73334

11/12/02 17:47:36 INFOmapred.JobClient:     Combine inputrecords=7508

11/12/02 17:47:36 INFOmapred.JobClient:     Map outputrecords=7508

11/12/02 17:47:36 INFOmapred.JobClient:     Reduce inputrecords=2367 

也可以通过本地浏览器进行查看状态:50070和50030端口(注意配置本地C:\Windows\System32\drivers\etc\hosts文件)


posted on 2011-12-05 14:31  h2内存数据库  阅读(821)  评论(0编辑  收藏  举报

导航