Skip to content

Instantly share code, notes, and snippets.

@wbchn
Last active May 24, 2017 08:04
Show Gist options
  • Save wbchn/994df32a988a9fd042a059eb3d5c1184 to your computer and use it in GitHub Desktop.
Save wbchn/994df32a988a9fd042a059eb3d5c1184 to your computer and use it in GitHub Desktop.
azure hdinsight user scripts demo
#!/usr/bin/env bash
GEOIP_WASB_DIR=$1
GEOIPCUSTOM_DIR=/home/sshuser
if [ -z "$GEOIP_WASB_DIR" ]; then
echo "[ERROR] No wasb directory specified. Exiting!"
exit 132
fi
# copy maxmind geoip database
hadoop fs -copyToLocal $GEOIP_WASB_DIR/*.* $GEOIPCUSTOM_DIR
# install conda packages
/usr/bin/anaconda/bin/pip install -c conda-forge geoip2 user_agents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment