HADOOP-16209. Create simple docker based pseudo-cluster for hdfs
This commit is contained in:
parent
b2269581f7
commit
e60f4418bd
|
@ -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}"
|
||||||
|
|
|
@ -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
|
|
@ -0,0 +1,2 @@
|
||||||
|
CORE-SITE.XML_fs.defaultFS=hdfs://namenode:8020
|
||||||
|
HDFS-SITE.XML_dfs.replication=1
|
Loading…
Reference in New Issue