This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
galaxy-deployment-ansible-d…/Apache HBase/2.2.3/hbase/role/tasks/status-check.yml
2024-01-18 15:35:34 +08:00

37 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

- name: Waitting for HBase running,10s
shell: sleep 10
- block:
- name: Check the HBase Master node status
shell: ps -ef | grep "org.apache.hadoop.hbase.master.HMaster" | grep -v grep |wc -l
register: check_master
- name: To terminate execution
fail:
msg: "检测到{{ inventory_hostname }}节点HBase未正常启动请保留日志反馈路径{{ deploy_dir }}/{{ container_name }}/logs"
run_once: true
delegate_to: 127.0.0.1
when: check_master.stdout != '1'
when: inventory_hostname in groups['hbase'][0:3]
- block:
- name: Check the HBase HRegionServer node status
shell: ps -ef | egrep "org.apache.hadoop.hbase.regionserver.HRegionServer" | grep -v grep |wc -l
register: check_region
- name: To terminate execution
fail:
msg: "检测到{{ inventory_hostname }}节点HBase未正常启动请保留日志反馈路径{{ deploy_dir }}/{{ container_name }}/logs"
run_once: true
delegate_to: 127.0.0.1
when: check_region.stdout != '1'
- name: Initializing phoenix
shell: cd {{ deploy_dir }}/{{ container_name }}/phoenix-hbase-2.2-5.1.2-bin/bin/ && ./startsql.sh
- name: Enable RsGroup
shell: cd {{ deploy_dir }}/{{ container_name }}/init/ && ./rsgroup.sh | grep ERROR | egrep -v "already exists|Target RSGroup important is same as source|Source RSGroup important is same as target"
register: result
failed_when: "'ERROR' in result.stdout"
when: hbase.common.enable_rsgroup