-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from porunov/master
Add hadoop 3 and multicluster support
- Loading branch information
Showing
25 changed files
with
926 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{%- if hadoop_major == 1 %} | ||
{%- set bindir='bin' %} | ||
{%- else %} | ||
{%- set bindir='sbin' %} | ||
{%- endif %} | ||
|
||
{%- set piddir="/var/run/hadoop" %} | ||
{%- set conf_dir="/etc/hadoop/conf" %} | ||
|
||
{%- if hadoop_svc == 'historyserver' %} | ||
{%- set pidfile=piddir+"/mapred-"+hadoop_user+"-"+hadoop_svc+".pid" %} | ||
{%- set exec_path=hadoop_home+"/"+bindir+"/mr-jobhistory-daemon.sh" %} | ||
{%- elif hadoop_user == 'yarn' %} | ||
{%- set pidfile=piddir+"/yarn-"+hadoop_user+"-"+hadoop_svc+".pid" %} | ||
{%- set exec_path=hadoop_home+"/"+bindir+"/yarn-daemon.sh" %} | ||
{%- else %} | ||
{%- set pidfile=piddir+"/hadoop-"+hadoop_user+"-"+hadoop_svc+".pid" %} | ||
{%- set exec_path=hadoop_home+"/"+bindir+"/hadoop-daemon.sh" %} | ||
{%- endif %} | ||
|
||
{%- if hadoop_major > 2 %} | ||
{%- set pidfile=piddir+"/hadoop-"+hadoop_user+"-"+hadoop_svc+".pid" %} | ||
{%- endif %} | ||
|
||
[Unit] | ||
Description=Hadoop DFS {{ hadoop_svc }} | ||
After=syslog.target network.target remote-fs.target nss-lookup.target network-online.target | ||
Requires=network-online.target | ||
|
||
[Service] | ||
User={{ hadoop_user }} | ||
Group=hadoop | ||
Type=forking | ||
RuntimeDirectory=hadoop | ||
RuntimeDirectoryMode=775 | ||
ExecStart={{ exec_path }} --config {{ conf_dir }} start {{ hadoop_svc }} | ||
ExecStop={{ exec_path }} --config {{ conf_dir }} stop {{ hadoop_svc }} | ||
TimeoutStartSec=2min | ||
Restart=on-failure | ||
PIDFile={{ pidfile }} | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.