forked from big-data-europe/docker-hadoop
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile-x
21 lines (20 loc) · 1.85 KB
/
Makefile-x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
DOCKER_NETWORK = docker-hadoop_default
ENV_FILE = hadoop.env
current_branch = 2.1.1-hadoop3.3.1-java8
build:
docker buildx build --push --platform linux/amd64,linux/arm64 -t wxwmatt/hadoop-release:$(current_branch) ./hadoop-release
docker buildx build --push --platform linux/amd64,linux/arm64 -t wxwmatt/hadoop-base:$(current_branch) ./base
docker buildx build --push --platform linux/amd64,linux/arm64 -t wxwmatt/hadoop-namenode:$(current_branch) ./namenode
docker buildx build --push --platform linux/amd64,linux/arm64 -t wxwmatt/hadoop-datanode:$(current_branch) ./datanode
docker buildx build --push --platform linux/amd64,linux/arm64 -t wxwmatt/hadoop-resourcemanager:$(current_branch) ./resourcemanager
docker buildx build --push --platform linux/amd64,linux/arm64 -t wxwmatt/hadoop-nodemanager:$(current_branch) ./nodemanager
docker buildx build --push --platform linux/amd64,linux/arm64 -t wxwmatt/hadoop-historyserver:$(current_branch) ./historyserver
docker buildx build --push --platform linux/amd64,linux/arm64 -t wxwmatt/hadoop-submit:$(current_branch) ./submit
wordcount:
docker build -t hadoop-wordcount ./submit
docker run --network ${DOCKER_NETWORK} --env-file ${ENV_FILE} wxwmatt/hadoop-base:$(current_branch) hdfs dfs -mkdir -p /input/
docker run --network ${DOCKER_NETWORK} --env-file ${ENV_FILE} wxwmatt/hadoop-base:$(current_branch) hdfs dfs -copyFromLocal -f /opt/hadoop-3.3.1/README.txt /input/
docker run --network ${DOCKER_NETWORK} --env-file ${ENV_FILE} hadoop-wordcount
docker run --network ${DOCKER_NETWORK} --env-file ${ENV_FILE} wxwmatt/hadoop-base:$(current_branch) hdfs dfs -cat /output/*
docker run --network ${DOCKER_NETWORK} --env-file ${ENV_FILE} wxwmatt/hadoop-base:$(current_branch) hdfs dfs -rm -r /output
docker run --network ${DOCKER_NETWORK} --env-file ${ENV_FILE} wxwmatt/hadoop-base:$(current_branch) hdfs dfs -rm -r /input