docker 安装hadoop
上一篇文章介绍了一些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