first version of hadoop-base hadoop-namenode and hadoop-datanode

This commit is contained in:
Giannis Mouchakis
2016-03-09 17:37:43 +02:00
parent dcff074a8d
commit b97e590f6f
6 changed files with 131 additions and 1 deletions
+29 -1
View File
@@ -1 +1,29 @@
this will be the repo for docker-hadoop
This is a docker container for hadoop.
By default it uses data replication "2". To change it edit the hdfs-site.xml file.
To start the namenode run
docker run --name namenode -h bde2020/hadoop-namenode
To start two datanodes on the same host run
docker run --name datanode1 --link namenode:namenode bde2020/hadoop-datanode
docker run --name datanode2 --link namenode:namenode bde2020/hadoop-datanode
More info is comming soon on how to run hadoop docker using docker network and docker swarm
All data are stored in /hdfs-data, so to store data in a host directory datanodes as
docker run --name datanode1 --link namenode:namenode -v /path/to/host:/hdfs-data bde2020/hadoop-datanode
docker run --name datanode2 --link namenode:namenode -v /path/to/host:/hdfs-data bde2020/hadoop-datanode
By default the namenode formats the namenode directory only if not exists (hdfs namenode -format -nonInteractive).
If you want to mount an external directory that already contains a namenode directory and format it you have to first delete it manually.
Hadoop namenode listens on
hdfs://namenode:8020
To use access the namenode from another container link it using "--link namenode:namenode" and then use the afformentioned URL.
More info on how to access it using docker network coming soon.