This repository has been archived by the owner on Apr 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (40 loc) · 2.75 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
deploy:
scp -r hadoop-docker [email protected]:~
scp -o 'ProxyJump [email protected]' -r hadoop-docker [email protected]:~
scp -o 'ProxyJump [email protected]' -r hadoop-docker [email protected]:~
swarm-deploy: deploy
ssh [email protected] "cd ~/hadoop-docker && ls -al && make swarm-deploy"
status:
ssh [email protected] "docker ps"
ssh -J [email protected] [email protected] "docker ps"
ssh -J [email protected] [email protected] "docker ps"
up: deploy
ssh [email protected] "cd ~/hadoop-docker && ls -al && make master"
ssh -J [email protected] [email protected] "cd ~/hadoop-docker && ls && make worker_1"
ssh -J [email protected] [email protected] "cd ~/hadoop-docker && ls && make worker_2"
down:
ssh [email protected] "cd ~/hadoop-docker && ls -al && make down"
ssh -J [email protected] [email protected] "cd ~/hadoop-docker && ls && make down"
ssh -J [email protected] [email protected] "cd ~/hadoop-docker && ls && make down"
hadoop-build:
cd map-reduce-temperature && mvn clean install
hadoop-deploy: hadoop-build
scp map-reduce-temperature/target/map-reduce-temperature-1.0-SNAPSHOT.jar [email protected]:~/hadoop-docker/hadoop_namenode
hadoop-run:
ssh [email protected] "cd ~/hadoop-docker && docker-compose exec -T hadoop-namenode hadoop fs -rm -r hdfs://node-master.lan:9000/user/hadoop/hadoop.output || true"
ssh [email protected] "cd ~/hadoop-docker && docker-compose exec -T hadoop-namenode hadoop jar /hadoop/dfs/name/map-reduce-temperature-1.0-SNAPSHOT.jar Temperature hdfs://node-master.lan:9000/user/hadoop/input hdfs://node-master.lan:9000/user/hadoop/hadoop.output"
spark-build:
cd spark-temperature && sbt package
spark-deploy: spark-build
scp spark-temperature/target/scala-2.11/spark-temperature_2.11-0.1.jar [email protected]:~/hadoop-docker/hadoop_namenode
spark-run:
ssh [email protected] "cd ~/hadoop-docker && docker-compose exec -T hadoop-namenode hadoop fs -rm -r hdfs://node-master.lan:9000/user/hadoop/spark.output || true"
ssh [email protected] "/opt/spark/bin/spark-submit --master spark://node-master.lan:7077 ~/hadoop-docker/hadoop_namenode/spark-temperature_2.11-0.1.jar hdfs://node-master.lan:9000/user/hadoop/input/London2013.csv hdfs://node-master.lan:9000/user/hadoop/spark.output"
spark-run-local: spark-build
spark-submit spark-temperature/target/scala-2.11/spark-temperature_2.11-0.1.jar ~/Work/data/London2013.csv spark.output
cat spark.output/part-00000
rm -rf spark.output
hadoop-cat:
ssh [email protected] "cd ~/hadoop-docker && docker-compose exec -T hadoop-namenode hadoop fs -cat /user/hadoop/hadoop.output/part-r-00000"
spark-cat:
ssh [email protected] "cd ~/hadoop-docker && docker-compose exec -T hadoop-namenode hadoop fs -cat /user/hadoop/spark.output/part-00000"