Skip to content

Instantly share code, notes, and snippets.

@brendancol
Last active October 1, 2015 02:14
Show Gist options
  • Save brendancol/2edc09cacd5bff38fd7a to your computer and use it in GitHub Desktop.
Save brendancol/2edc09cacd5bff38fd7a to your computer and use it in GitHub Desktop.
When deploying Spark with spark-ec2 with --ebs-vol-size option, the mount location is wrong by default, this script: stops cluster, fixes mount location, reformats hdfs and restarts.
#!/usr/bin/env bash
~/persistent-hdfs/sbin/stop-all.sh
sed -i 's#vol/persistent-hdfs#vol0/persistent-hdfs#g' ~/persistent-hdfs/conf/core-site.xml
~/spark-ec2/copy-dir.sh ~/persistent-hdfs/conf/core-site.xml
~/persistent-hdfs/bin/hadoop namenode -format -y
~/persistent-hdfs/sbin/start-all.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment