Skip to content

Instantly share code, notes, and snippets.

@dharmeshkakadia
Last active June 28, 2017 22:39
Show Gist options
  • Select an option

  • Save dharmeshkakadia/13132dbd16c4ef708adaaa46aad32ca3 to your computer and use it in GitHub Desktop.

Select an option

Save dharmeshkakadia/13132dbd16c4ef708adaaa46aad32ca3 to your computer and use it in GitHub Desktop.
if [[ $(hostname -s) = hn0-* ]]; then
nodes=$(curl -L http://headnodehost:8088/ws/v1/cluster/nodes | grep -o '"nodeHostName":"[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*"' | wc -l)
if [[ $nodes -lt 4 ]]; then
echo "you need atlead 4 node hadoop cluster to run presto on HDI. Aborting"
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment