summarylogtreecommitdiffstats
path: root/hadoop.install
blob: e152b839570921689ca8b34bfd8fd7c90417bf0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
post_install() {
	getent group hadoop || groupadd hadoop
	getent passwd hadoop || useradd -g hadoop -r -d /var/lib/hadoop hadoop
	chown -R hadoop:hadoop /var/{lib,log}/hadoop
}

pre_remove() {
	for s in datanode historyserver namenode resourcemanager secondarynamenode; do
		systemctl stop hadoop-$s.service
		systemctl --no-reload disable hadoop-$s.service
	done
}

post_remove() {
	userdel -r hadoop
	rm -rf /var/log/hadoop
}