forked from lizhitao0923/ansible-hadoop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stop.yml
86 lines (78 loc) · 2 KB
/
stop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
# kill zookeeper
- hosts: zookeepers
user: root
sudo_user: "{{zookeeper.owner}}"
sudo: true
tasks:
- name: kill zookeepers
raw: source /etc/profile;jps|grep -i QuorumPeerMain |awk '{print $1}'|xargs kill
ignore_errors: True
tags:
- stop_zookeeper
# kill journalnode
- hosts: journalnodes
user: root
sudo_user: "{{hadoop.owner}}"
sudo: true
tasks:
- name: kill journalnodes
raw: source /etc/profile;jps|grep -i JournalNode |awk '{print $1}'|xargs kill
ignore_errors: True
tags:
- stop_journalnode
# kill namenode
- hosts: namenodes
user: root
sudo_user: "{{hadoop.owner}}"
sudo: true
tasks:
- name: kill namenodes
raw: source /etc/profile;jps|grep -i NameNode |awk '{print $1}'|xargs kill
ignore_errors: True
tags:
- stop_namenode
# kill ZKFC
- hosts: namenodes
user: root
sudo_user: "{{hadoop.owner}}"
sudo: true
tasks:
- name: kill ZKFC
raw: source /etc/profile;jps|grep -i DFSZKFailoverController |awk '{print $1}'|xargs kill
ignore_errors: True
tags:
- stop_zkfc
# kill datanode
- hosts: datanodes
user: root
sudo_user: "{{hadoop.owner}}"
sudo: true
tasks:
- name: kill datanodes
raw: source /etc/profile;jps|grep -i DataNode |awk '{print $1}'|xargs kill
ignore_errors: True
tags:
- stop_datanode
# kill resourcemanager
- hosts: resourcemanagers
user: root
sudo_user: "{{hadoop.owner}}"
sudo: true
tasks:
- name: kill resourcemanagers
raw: source /etc/profile;jps|grep -i ResourceManager |awk '{print $1}'|xargs kill
ignore_errors: True
tags:
- stop_resourcemanager
# kill nodemanager
- hosts: nodemanagers
user: root
sudo_user: "{{hadoop.owner}}"
sudo: true
tasks:
- name: kill nodemanagers
raw: source /etc/profile;jps|grep -i NodeManager |awk '{print $1}'|xargs kill
ignore_errors: True
tags:
- stop_nodemanager