-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (35 loc) · 878 Bytes
/
Makefile
File metadata and controls
43 lines (35 loc) · 878 Bytes
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
SHELL = /bin/sh
# Scala version
SCALA_VERSION ?= 2.11.12
# Spark home
SPARK_HOME ?= /usr/local/spark
# SBT
SBT = ./sbt ++$(SCALA_VERSION)
# Submit spark app args
APP_NAME = "QuerySetApp"
APP_MAIN_CLASS = "tech.sourced.queryset.Main"
SPARK_MASTER ?= "local[*]"
NUM_EXECUTORS ?= 1
EXECUTOR_MEM ?= 1G
EXECUTORS_CORES ?= 4
APP_VERSION = 0.2.0
UBER_JAR = "target/scala-2.11/queryset-$(APP_VERSION).jar"
REPOS_PATH ?= "src/main/resources/siva-files"
REPOS_FORMAT ?= "siva"
APP_ARGS = $(REPOS_PATH) $(REPOS_FORMAT)
# Rules
all: clean build
.PHONY: run build clean
run:
$(SPARK_HOME)/bin/spark-submit \
--name $(APP_NAME) \
--class $(APP_MAIN_CLASS) \
--master $(SPARK_MASTER) \
--num-executors $(NUM_EXECUTORS) \
--executor-memory $(EXECUTOR_MEM) \
--total-executor-cores $(EXECUTORS_CORES) \
$(UBER_JAR) $(APP_ARGS)
build: clean
$(SBT) assembly
clean:
$(SBT) clean