Skip to content

Commit

Permalink
Merge branch '202409-loadRules' of https://github.com/implydata/learn…
Browse files Browse the repository at this point in the history
…-druid into 202409-loadRules
  • Loading branch information
petermarshallio committed Sep 24, 2024
2 parents 7ee02a7 + 25775c7 commit 5155362
Show file tree
Hide file tree
Showing 8 changed files with 109 additions and 67 deletions.
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
name: codespell
description: Checks for common misspellings in text files.
entry: codespell --ignore-words=ignore-spelling-words.txt
language: python
types: [text]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ It contains:
Suggestions or comments? Call into the [discussions](https://github.com/implydata/learn-druid/discussions). Found a problem or want to request a notebook? Raise an [issue](https://github.com/implydata/learn-druid/issues). Want to contribute? Raise a [PR](https://github.com/implydata/learn-druid/pulls).

[Contributions](contributing.md) to this community resource are welcome! Contribute your own notebook on a topic that's not listed here, and check out the [issue](https://github.com/implydata/learn-druid/issues) list, where you'll find bugs and enhancement requests.

Come meet your friendly Apache Druid [community](https://druid.apache.org/community) if you have any questions about the functionality you see here.

## Pre-requisites
Expand All @@ -48,7 +48,7 @@ To use the "Learn Druid" Docker Compose, you need:
To get started quickly:

1. Clone the repository:

```bash
git clone https://github.com/implydata/learn-druid
```
Expand Down
15 changes: 11 additions & 4 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,21 @@ Here are some general guidelines on making a notebook.
The [contributing](https://github.com/implydata/learn-druid/tree/main/notebooks/99-contributing) folder contains a notebook template as a starting point. You'll find boilerplate elements including:

* Setting the connection to Druid, Kafka, and the data generator.
* Starter elements for ingesting from example datas sets or the data generator.
* Starter elements for ingesting from example data sets or the data generator.
* Clean-up elements, like dropping tables, stopping streaming ingestion, and halting data generator jobs.
* Re-usable code elements that other contributors have found useful.
* Reusable code elements that other contributors have found useful.

And don't forget that the template itself is open to contribution!

### Raise a PR

Please install and run the [pre-commit](https://pre-commit.com/) before raising PRs.

```bash
pip install pre-commit
pre-commit install
```

When you have a notebook and you're ready for feedback, it's a good idea to raise a draft PR first. Feel free to use the comments section to ask for initial feedback, or drop into the docs channel in the official Apache Druid Slack channel.

And when it's ready to go, finalize your PR. Add reviewers, get formal feedback, make any necessary changes, etc. in the usual way.
Expand All @@ -39,12 +46,12 @@ Use the same route to run a locally-built Docker image by using the appropriate

### Run automated tests on notebooks

Make sure that docker compose is down and all volumes have been deleted, then start tests with:
Make sure that docker compose is down and all volumes have been deleted, then start tests with:

```shell
cd tests
./test-notebooks.sh
```
```

To test single notebook:

Expand Down
32 changes: 16 additions & 16 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ services:
postgres:
image: postgres:alpine3.20
container_name: postgres
profiles: ["druid-jupyter", "all-services", "druid-jupyter-tiered-hist"]
profiles: ["druid-jupyter", "all-services", "tiered-druid-jupyter"]
volumes:
- metadata_data:/var/lib/postgresql/data
environment:
Expand All @@ -46,11 +46,11 @@ services:
zookeeper:
image: zookeeper:3.9.2
container_name: zookeeper
profiles: ["druid-jupyter", "kafka-jupyter", "all-services", "druid-jupyter-tiered-hist"]
profiles: ["druid-jupyter", "kafka-jupyter", "all-services", "tiered-druid-jupyter"]
environment:
- ZOO_MY_ID=1
- ALLOW_ANONYMOUS_LOGIN=yes

kafka:
image: bitnami/kafka:3.6.2
container_name: kafka-broker
Expand All @@ -74,11 +74,11 @@ services:
coordinator:
image: imply/druid:${DRUID_VERSION:-30.0.0}
container_name: coordinator
profiles: ["druid-jupyter", "all-services", "druid-jupyter-tiered-hist"]
profiles: ["druid-jupyter", "all-services", "tiered-druid-jupyter"]
volumes:
- druid_shared:/opt/shared
- coordinator_var:/opt/druid/var
depends_on:
depends_on:
- zookeeper
- postgres
ports:
Expand All @@ -91,11 +91,11 @@ services:
broker:
image: imply/druid:${DRUID_VERSION:-30.0.0}
container_name: broker
profiles: ["druid-jupyter", "all-services", "druid-jupyter-tiered-hist"]
profiles: ["druid-jupyter", "all-services", "tiered-druid-jupyter"]
volumes:
- broker_var:/opt/druid/var
- druid_shared:/opt/shared
depends_on:
depends_on:
- zookeeper
- postgres
- coordinator
Expand All @@ -109,11 +109,11 @@ services:
historical:
image: imply/druid:${DRUID_VERSION:-30.0.0}
container_name: historical
profiles: ["druid-jupyter", "all-services", "druid-jupyter-tiered-hist"]
profiles: ["druid-jupyter", "all-services", "tiered-druid-jupyter"]
volumes:
- druid_shared:/opt/shared
- historical_var:/opt/druid/var
depends_on:
depends_on:
- zookeeper
- postgres
- coordinator
Expand All @@ -127,11 +127,11 @@ services:
historical_slow:
image: imply/druid:${DRUID_VERSION:-30.0.0}
container_name: historical_slow
profiles: ["druid-jupyter-tiered-hist"]
profiles: ["tiered-druid-jupyter"]
volumes:
- druid_shared:/opt/shared
- historical_2_var:/opt/druid/var
depends_on:
depends_on:
- zookeeper
- postgres
- coordinator
Expand All @@ -150,11 +150,11 @@ services:
middlemanager:
image: imply/druid:${DRUID_VERSION:-30.0.0}
container_name: middlemanager
profiles: ["druid-jupyter", "all-services", "druid-jupyter-tiered-hist"]
profiles: ["druid-jupyter", "all-services", "tiered-druid-jupyter"]
volumes:
- druid_shared:/opt/shared
- middle_var:/opt/druid/var
depends_on:
depends_on:
- zookeeper
- postgres
- coordinator
Expand All @@ -169,7 +169,7 @@ services:
router:
image: imply/druid:${DRUID_VERSION:-30.0.0}
container_name: router
profiles: ["druid-jupyter", "all-services", "druid-jupyter-tiered-hist"]
profiles: ["druid-jupyter", "all-services", "tiered-druid-jupyter"]
volumes:
- router_var:/opt/druid/var
depends_on:
Expand All @@ -186,7 +186,7 @@ services:
jupyter:
image: imply/druid-notebook:latest
container_name: jupyter
profiles: ["jupyter", "kafka-jupyter", "druid-jupyter", "all-services", "druid-jupyter-tiered-hist"]
profiles: ["jupyter", "kafka-jupyter", "druid-jupyter", "all-services", "tiered-druid-jupyter"]
environment:
JUPYTER_ENABLE_LAB: "yes"
JUPYTER_TOKEN: "docker"
Expand All @@ -203,7 +203,7 @@ services:
datagen:
image: imply/datagen:latest
container_name: datagen
profiles: ["jupyter", "kafka-jupyter", "druid-jupyter", "all-services", "druid-jupyter-tiered-hist"]
profiles: ["jupyter", "kafka-jupyter", "druid-jupyter", "all-services", "tiered-druid-jupyter"]
ports:
- "${DATAGEN_PORT:-9999}:9999"
volumes:
Expand Down
8 changes: 8 additions & 0 deletions ignore-spelling-words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
EGE
MKE
MOT
SAV
AGS

Rouge
Nome
Loading

0 comments on commit 5155362

Please sign in to comment.