Skip to content

Instantly share code, notes, and snippets.

@zerebral
Last active February 22, 2018 12:42
Show Gist options
  • Save zerebral/c4ed3dca3903395d6b063e1f019d55cb to your computer and use it in GitHub Desktop.
Save zerebral/c4ed3dca3903395d6b063e1f019d55cb to your computer and use it in GitHub Desktop.
Clean up Storm state and restart the cluster
To clean up Zk and Storm local stores and restart cluster -
On red01
cd /home/anand/projects/ansible-storm
ansible-playbook -i hosts_sample roles/stop_storm.yaml
ansible -i hosts_sample supervisor -a 'bash -lc "killall ruby"'
Check if no ruby processes running on the supervisors - repeat killall till you see no processes
ansible -i hosts_sample supervisor -a 'bash -lc "ps -ef | grep ruby"'
Delete Storm store in Zk and Zk local data -
On red09
~/zookeeper-3.4.9/bin/zkCli.sh
rmr /storm
On red01
ansible -i hosts_sample zookeeper -a '/home/anand/zookeeper-3.4.9/bin/zkServer.sh stop'
ansible -i hosts_sample zookeeper -a 'rm -rf /home/anand/zookeeper-3.4.9/data/version-2'
Delete Storm local storage -
ansible -i hosts_sample supervisor -a 'bash -lc "rm -rf ~/storm-1.1.0_6/storm/apache-storm-1.1.1/app"'
ansible -i hosts_sample supervisor -a 'bash -lc "rm -rf ~/storm-1.1.0_6/storm/apache-storm-1.1.1/storm-local"'
Delete app logs -
delete parser old logs
ansible -i hosts_sample supervisor -a 'bash -lc "rm /home/anand/apache-storm-1.1.0/logs/workers-artifacts/ab-parser-logs/*"'
Start Zk and Storm cluster -
ansible -i hosts_sample zookeeper -a '/home/anand/zookeeper-3.4.9/bin/zkServer.sh start'
ansible-playbook -i hosts_sample roles/run_storm.yaml
@rraundal
Copy link

delete parser old logs
ansible -i hosts_sample supervisor -a 'bash -lc "grep Error /home/anand/apache-storm-1.1.0/logs/workers-artifacts/ab-parser-logs/*"'

@rraundal
Copy link

delete all supervisor old logs
ansible -i hosts_sample supervisor -a 'bash -lc "rm -rf ~/storm-1.1.0_6/storm/apache-storm-1.1.1/logs/supervisor.log"'

@rraundal
Copy link

rraundal commented Oct 9, 2017

delet storm logs
ansible -i hosts_sample supervisor -a 'bash -lc "rm -rf ~/storm-1.1.0_6/storm/apache-storm-1.1.1/logs/workers-artifacts/*"'

@rraundal
Copy link

rraundal commented Oct 13, 2017

ansible -i hosts_sample supervisor -a 'bash -lc "mkdir -p /home/anand/apache-storm-1.1.0/logs/workers-artifacts/1812"'
ansible -i hosts_sample supervisor -a 'bash -lc "mv /home/anand/apache-storm-1.1.0/logs/workers-artifacts/ab-parser-logs/*
ansible -i hosts_sample supervisor -a 'bash -lc "rm /home/anand/apache-storm-1.1.0/logs/workers-artifacts/ab-extractor-logs/*"'
/home/anand/apache-storm-1.1.0/logs/workers-artifacts/1812"'

@rraundal
Copy link

rraundal commented Nov 2, 2017

ansible -i hosts_sample supervisor -a 'bash -lc "rm ~/http_get_stats/*.log"'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment