Commit 608eda10 by brianhw Committed by GitHub

Merge pull request #3838 from edx/brian/fix-hive-schema-init

Add check to see if hive metastore is initialized.
parents 2f823df8 c5d1aac9
...@@ -230,9 +230,18 @@ ...@@ -230,9 +230,18 @@
- install - install
- install:configuration - install:configuration
- name: Test if Hive metadata store schema exists
shell: ". {{ HADOOP_COMMON_CONF_DIR }}/hadoop-env.sh && {{ HIVE_HOME }}/bin/hive | tr '\n' ' '"
become_user: "{{ hadoop_common_user }}"
register: hive_metastore_info
tags:
- install
- install:configuration
- name: Initialize Hive metadata store schema - name: Initialize Hive metadata store schema
shell: ". {{ HADOOP_COMMON_CONF_DIR }}/hadoop-env.sh && {{ HIVE_HOME }}/bin/schematool -dbType mysql -initSchema" shell: ". {{ HADOOP_COMMON_CONF_DIR }}/hadoop-env.sh && {{ HIVE_HOME }}/bin/schematool -dbType mysql -initSchema"
become_user: "{{ hadoop_common_user }}" become_user: "{{ hadoop_common_user }}"
when: "'Version information not found in metastore' in hive_metastore_info.stderr"
tags: tags:
- install - install
- install:base - install:configuration
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment