HADOOP-16209. Create simple docker based pseudo-cluster for hdfs

This commit is contained in:
Gabor Bota 2019-03-27 12:09:49 +01:00
parent b2269581f7
commit e60f4418bd
3 changed files with 24 additions and 0 deletions

View File

@ -149,6 +149,7 @@ run cp -p "${ROOT}/hadoop-client-modules/hadoop-client-minicluster/target/hadoop
run copy "${ROOT}/hadoop-tools/hadoop-tools-dist/target/hadoop-tools-dist-${VERSION}" . run copy "${ROOT}/hadoop-tools/hadoop-tools-dist/target/hadoop-tools-dist-${VERSION}" .
run cp -pr "${ROOT}/hadoop-dist/src/main/compose" .
echo echo
echo "Hadoop dist layout available at: ${BASEDIR}/hadoop-${VERSION}" echo "Hadoop dist layout available at: ${BASEDIR}/hadoop-${VERSION}"

View File

@ -0,0 +1,21 @@
version: "2"
services:
namenode:
image: apache/hadoop-runner:jdk8
hostname: namenode
volumes:
- ../..:/opt/hadoop
command: ["hdfs","namenode"]
ports:
- 9870:9870
env_file:
- ./docker-config
environment:
ENSURE_NAMENODE_DIR: "/tmp/hadoop-root/dfs/name"
datanode:
image: apache/hadoop-runner:jdk8
command: ["hdfs", "datanode"]
volumes:
- ../..:/opt/hadoop
env_file:
- ./docker-config

View File

@ -0,0 +1,2 @@
CORE-SITE.XML_fs.defaultFS=hdfs://namenode:8020
HDFS-SITE.XML_dfs.replication=1