Skip to content

Commit

Permalink
feat(yarn-timelineserver-v2): setup Timelineserver Reader service.
Browse files Browse the repository at this point in the history
  • Loading branch information
dapicard committed Sep 29, 2023
1 parent 3cc760e commit b394a0b
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 3 deletions.
4 changes: 3 additions & 1 deletion playbooks/hbase_client_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

---
- name: HBase Client Config
hosts: hbase_client
hosts:
- hbase_client
- yarn_ats
tasks:
- tosit.tdp.resolve: # noqa unnamed-task
node_name: hbase_client
Expand Down
4 changes: 3 additions & 1 deletion playbooks/hbase_client_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

---
- name: HBase Client install
hosts: hbase_client
hosts:
- hbase_client
- yarn_ats
tasks:
- tosit.tdp.resolve: # noqa unnamed-task
node_name: hbase_client
Expand Down
10 changes: 10 additions & 0 deletions roles/yarn/apptimelineserver/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,13 @@
mode: "644"
notify:
- systemctl daemon-reload

- name: Template YARN Timeline Reader V2 service file
ansible.builtin.template:
src: hadoop-yarn-timelinereader.service.j2
dest: /usr/lib/systemd/system/hadoop-yarn-timelinereader.service
owner: root
group: root
mode: "644"
notify:
- systemctl daemon-reload
2 changes: 1 addition & 1 deletion roles/yarn/apptimelineserver/tasks/ranger_policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
isExcludes: false
isRecursive: false
policyItems:
- users: ["{{ yarn_user }}"]
- users: ["{{ yarn_user }}", "ats"]
groups: []
delegateAdmin: false
accesses:
Expand Down
6 changes: 6 additions & 0 deletions roles/yarn/apptimelineserver/tasks/restart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@
name: hadoop-yarn-timelineserver
state: restarted
enabled: "{{ yarn_ts_start_on_boot }}"

- name: Restart YARN Timeline Reader V2
service:
name: hadoop-yarn-timelinereader
state: restarted
enabled: "{{ yarn_ts_start_on_boot }}"
6 changes: 6 additions & 0 deletions roles/yarn/apptimelineserver/tasks/start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@
name: hadoop-yarn-timelineserver
state: started
enabled: "{{ yarn_ts_start_on_boot }}"

- name: Start Timeline Reader V2
service:
name: hadoop-yarn-timelinereader
state: started
enabled: "{{ yarn_ts_start_on_boot }}"
6 changes: 6 additions & 0 deletions roles/yarn/apptimelineserver/tasks/status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@
that:
- ansible_facts.services['hadoop-yarn-timelineserver.service'].state == "running"
quiet: true

- name: Assert hadoop-yarn-timelinereader is running
assert:
that:
- ansible_facts.services['hadoop-yarn-timelinereader.service'].state == "running"
quiet: true
6 changes: 6 additions & 0 deletions roles/yarn/apptimelineserver/tasks/stop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@
name: hadoop-yarn-timelineserver
state: stopped
enabled: "{{ yarn_ts_start_on_boot }}"

- name: Stop YARN Timeline Reader V2
service:
name: hadoop-yarn-timelinereader
state: stopped
enabled: "{{ yarn_ts_start_on_boot }}"
18 changes: 18 additions & 0 deletions roles/yarn/common/templates/hadoop-yarn-timelinereader.service.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[Unit]
Description=Yarn Timelinereader V2
After=network-online.target
Wants=network-online.target

[Service]
User={{ yarn_user }}
Group={{ hadoop_group }}
Type=forking
PIDFile={{ hadoop_pid_dir }}/yarn/hadoop-yarn-timelinereader.pid
ExecStart={{ hadoop_install_dir }}/bin/yarn --config {{ hadoop_ats_conf_dir }} --daemon start timelinereader
ExecStop={{ hadoop_install_dir }}/bin/yarn --config {{ hadoop_ats_conf_dir }} --daemon stop timelinereader
SuccessExitStatus=143
LimitNOFILE=64000
Restart={{ yarn_ts_restart }}

[Install]
WantedBy=multi-user.target
1 change: 1 addition & 0 deletions tdp_vars_defaults/tdp-cluster/tdp-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ yarn_nm_http_port: 8042
yarn_nm_https_port: 8044
yarn_ats_rpc_port: 10200
yarn_ats_https_port: 8190
yarn_ats_reader_https_port: 8191

# Mapred ports
mapred_sh_shuffle_port: 13562
Expand Down
1 change: 1 addition & 0 deletions tdp_vars_defaults/yarn/yarn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ yarn_site:
yarn.timeline-service.hostname: "{{ groups['yarn_ats'][0] | tosit.tdp.access_fqdn(hostvars) }}"
yarn.timeline-service.address: "0.0.0.0:{{ yarn_ats_rpc_port }}"
yarn.timeline-service.webapp.https.address: "{{ groups['yarn_ats'][0] | tosit.tdp.access_fqdn(hostvars) }}:{{ yarn_ats_https_port }}"
yarn.timeline-service.reader.webapp.https.address: "{{ groups['yarn_ats'][0] | tosit.tdp.access_fqdn(hostvars) }}:{{ yarn_ats_reader_https_port }}"
yarn.timeline-service.principal: ats/_HOST@{{ realm }}
yarn.timeline-service.keytab: /etc/security/keytabs/ats.service.keytab
# To enable Kerberos on the ATS UI
Expand Down

0 comments on commit b394a0b

Please sign in to comment.