Docker 部署 Hadoop

1. 架构图 {#hdfs_architecture}

2. 部署 {#Deploy_Hadoop}

# git clone https://github.com/big-data-europe/docker-hadoop.git
# cd docker-hadoop
# docker-compose up
1
2
3

3. 验证 {#Test}

$ docker exec -it namenode bash

$ mkdir input
$ echo "Hello World" >input/f1.txt
$ echo "Hello Docker" >input/f2.txt

$ hadoop fs -mkdir -p input
$ hdfs dfs -put ./input/* input
1
2
3
4
5
6
7
8

检查空间

$ hadoop fs -df -h /
Filesystem              Size   Used  Available  Use%
hdfs://namenode:9000  58.4 G  100 K     32.4 G    0%
1
2
3

reference