Created
April 16, 2020 23:16
-
-
Save AlexJReid/1684106b2118dfa69f98b68345cad634 to your computer and use it in GitHub Desktop.
Cloud Dataproc and Druid - initialisation action to enable batch ingest from GCS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euxo pipefail | |
# Override loaded extensions | |
cat << EOF >> /usr/lib/druid/conf/druid/_common/common.runtime.properties | |
# Override | |
druid.extensions.loadList=["druid-histogram", "druid-datasketches", "druid-lookups-cached-global", "mysql-metadata-storage", "druid-hdfs-storage", "druid-google-extensions"] | |
EOF | |
# Restart | |
ROLE=$(/usr/share/google/get_metadata_value attributes/dataproc-role) | |
if [[ $ROLE == 'Master' ]]; then | |
systemctl restart druid-router | |
systemctl restart druid-coordinator | |
systemctl restart druid-overlord | |
systemctl restart druid-broker | |
else | |
systemctl restart druid-historical | |
systemctl restart druid-middle-manager | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment