基础版本

This commit is contained in:
jianlong
2021-08-19 17:26:25 +08:00
commit 0dc57dfdd7
540 changed files with 54647 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
- name: get HBase master_ip
shell: echo "{{ ansible_play_hosts }}" | grep -E -o "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+" | head -n 1
register: master_out
- name: master_ip to ansible variable
set_fact: master_ip="{{master_out.stdout}}"
#复制tar到目标服务器
- name: copy spark config files
template:
src: 'create-hbase-table.sh.j2'
dest: '{{ install_path }}/{{ hbase_version }}/bin/create-hbase-table.sh'
mode: 0755
force: true
backup: yes
- name: create hbase table
shell: cd {{ install_path }}/{{ hbase_version }}/bin/ && ./create-hbase-table.sh
run_once: true
delegate_facts: true
delegate_to: "{{ master_ip }}"

View File

@@ -0,0 +1,14 @@
#!/bin/bash
source /etc/profile
exec {{ install_path }}/{{ hbase_version }}/bin/hbase shell <<EOF
create_namespace 'tsg'
create_namespace 'sub'
create 'tsg:report_result', {NAME => 'response', VERSIONS => 1,COMPRESSION => 'GZ',IS_MOB => true, MOB_THRESHOLD => 0}, {NAME => 'detail',COMPRESSION => 'GZ',VERSIONS => 1}
create 'sub:subscriber_info', {NAME => 'subscriber_id', VERSIONS => 1}
list
EOF