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

docker 安装hadoop

时间:2014-12-15 12:04:13      阅读:195      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   io   ar   color   os   sp   for   

上一篇文章介绍了一些docker的基本命令,这篇文章来安装一个HADOOP

一、下载hadoop镜像

@~/git/github/docker-ambari (master)$ docker pull sequenceiq/hadoop-docker:2.6.0
Pulling repository sequenceiq/hadoop-docker
7b738796aaab: Pulling dependent layers 
89b52f216c6c: Download complete 
... 这个一个漫长的过程
Status: Downloaded newer image for sequenceiq/hadoop-docker:2.6.0

二、查看镜像

@~ $ docker images
REPOSITORY                 TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
ubuntu                     curl-ubuntu         aac468ce18c8        17 hours ago        204.1 MB
sequenceiq/hadoop-docker   2.6.0               7b738796aaab        6 days ago          1.597 GB
ubuntu                     latest              9bd07e480c5b        10 days ago         192.7 MB
<none>                     <none>              c840fd1ab2ae        6 weeks ago         984.4 MB

三、运行hadoop

@~ $ docker run -i -t sequenceiq/hadoop-docker:2.6.0 /etc/bootstrap.sh -bash
Starting sshd:                                             [  OK  ]
......

四、查看结果

bash-4.1# bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.0.jar grep input output ‘dfs[a-z.]+‘
14/12/14 09:45:31 INFO client.RMProxy: Connecting to ResourceManager at /0.0.0.0:8032
14/12/14 09:45:32 WARN mapreduce.JobSubmitter: No job jar file set.  User classes may not be found. See Job or Job#setJar(String).
14/12/14 09:45:32 INFO input.FileInputFormat: Total input paths to process : 31

五、继续

bash-4.1# bin/hdfs dfs -cat output/*
6    dfs.audit.logger
4    dfs.class
3    dfs.server.namenode.
2    dfs.period
2    dfs.audit.log.maxfilesize
2    dfs.audit.log.maxbackupindex
1    dfsmetrics.log
1    dfsadmin
1    dfs.servers
1    dfs.replication
1    dfs.file

 

参考:

https://registry.hub.docker.com/u/sequenceiq/hadoop-docker/

http://www.tuicool.com/articles/7V7vYn

http://www.linuxeden.com/html/news/20140701/153247.html

docker 安装hadoop

标签:style   blog   http   io   ar   color   os   sp   for   

原文地址:http://www.cnblogs.com/liqiu/p/4164406.html

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