added submit image
This commit is contained in:
parent
bd8bf613cd
commit
75eb1bacc2
12
Makefile
12
Makefile
@ -1,3 +1,5 @@
|
||||
DOCKER_NETWORK = hadoop
|
||||
ENV_FILE = hadoop.env
|
||||
current_branch := $(shell git rev-parse --abbrev-ref HEAD)
|
||||
build:
|
||||
docker build -t bde2020/hadoop-base:$(current_branch) ./base
|
||||
@ -6,3 +8,13 @@ build:
|
||||
docker build -t bde2020/hadoop-resourcemanager:$(current_branch) ./resourcemanager
|
||||
docker build -t bde2020/hadoop-nodemanager:$(current_branch) ./nodemanager
|
||||
docker build -t bde2020/hadoop-historyserver:$(current_branch) ./historyserver
|
||||
docker build -t bde2020/hadoop-submit:$(current_branch) ./submit
|
||||
|
||||
wordcount:
|
||||
docker build -t hadoop-wordcount ./submit
|
||||
docker run --network ${DOCKER_NETWORK} --env-file ${ENV_FILE} bde2020/hadoop-base:$(current_branch) hdfs dfs -mkdir -p /input/
|
||||
docker run --network ${DOCKER_NETWORK} --env-file ${ENV_FILE} bde2020/hadoop-base:$(current_branch) hdfs dfs -copyFromLocal /opt/hadoop-2.8.0/README.txt /input/
|
||||
docker run --network ${DOCKER_NETWORK} --env-file ${ENV_FILE} hadoop-wordcount
|
||||
docker run --network ${DOCKER_NETWORK} --env-file ${ENV_FILE} bde2020/hadoop-base:$(current_branch) hdfs dfs -cat /output/*
|
||||
docker run --network ${DOCKER_NETWORK} --env-file ${ENV_FILE} bde2020/hadoop-base:$(current_branch) hdfs dfs -rm -r /output
|
||||
docker run --network ${DOCKER_NETWORK} --env-file ${ENV_FILE} bde2020/hadoop-base:$(current_branch) hdfs dfs -rm -r /input
|
||||
|
13
submit/Dockerfile
Normal file
13
submit/Dockerfile
Normal file
@ -0,0 +1,13 @@
|
||||
FROM bde2020/hadoop-base:1.2.0-hadoop2.8-java8
|
||||
MAINTAINER Ivan Ermilov <ivan.s.ermilov@gmail.com>
|
||||
|
||||
COPY WordCount.jar /opt/hadoop/applications/WordCount.jar
|
||||
|
||||
ENV JAR_FILEPATH="/opt/hadoop/applications/WordCount.jar"
|
||||
ENV CLASS_TO_RUN="WordCount"
|
||||
ENV PARAMS="/input /output"
|
||||
|
||||
ADD run.sh /run.sh
|
||||
RUN chmod a+x /run.sh
|
||||
|
||||
CMD ["/run.sh"]
|
BIN
submit/WordCount.jar
Normal file
BIN
submit/WordCount.jar
Normal file
Binary file not shown.
3
submit/run.sh
Normal file
3
submit/run.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
$HADOOP_PREFIX/bin/hadoop jar $JAR_FILEPATH $CLASS_TO_RUN $PARAMS
|
Loading…
x
Reference in New Issue
Block a user