-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
68 lines (51 loc) · 1.97 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
56
57
58
59
60
61
62
63
64
65
66
67
68
.PHONY: all test docker-test docker-pytest docker-hdfs-clear docker-stop docker-all
all: test
# Only for local testing
test:
pytest
install:
pip install -r requirements.txt -r requirements-tests.txt .
run-examples:
cd docker && \
docker-compose run --rm -e JOBLIB_HDFS_NAMENODE=namenode joblib-hadoop-client make docker-examples
run-all:
cd docker && \
docker-compose run --rm -e JOBLIB_HDFS_NAMENODE=namenode joblib-hadoop-client make docker-all
run-container:
cd docker && \
docker-compose run --rm -e JOBLIB_HDFS_NAMENODE=namenode joblib-hadoop-client bash
# Start the Hadoop cluster
docker-start:
cd docker && docker-compose up
# Gently stop/remove a running Hadoop cluster
docker-stop:
cd docker && docker-compose stop
cd docker && docker-compose rm -f
# Launch the test suite in the joblib-hadoop client docker container.
# For the moment, this is the only way for testing the YARN backend
# automatically.
docker-test:
cd docker && \
docker-compose run --rm -e JOBLIB_HDFS_NAMENODE=namenode joblib-hadoop-client make docker-pytest
# Examples runner helpers
hdfs-example:
python examples/joblib_hdfs_multiply.py
# The YARN example only works if access to the hadoop cluster is not done via
# localhost (e.g use it from the .
yarn-example:
python examples/joblib_yarn_parallel.py
examples: hdfs-example yarn-example
# The following targets can only be used from inside the joblib-hadoop-client
# docker container.
# Run this each time the joblib-hadoop-client container is started in
# interactive mode.
# The coverage is moved from the container to the host in order to be used
# later by codecov: we need this trick since the YARN backend can only be tested
# from the container.
docker-pytest: install hdfs-clear test
docker-examples: install examples
docker-all: docker-pytest docker-examples
# Pytest creates the Memory cache test results in /user/test in the hdfs
# cluster, this target ensures we start from a fresh setup.
hdfs-clear:
hdfs dfs -rm -f -r /user/test