Repository: bigtop
Updated Branches:
  refs/heads/master c8c056584 -> c02f4947b


BIGTOP-3110. [Puppet] Hive metastore can not startup successfully


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/c02f4947
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/c02f4947
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/c02f4947

Branch: refs/heads/master
Commit: c02f4947b5bd3947d3b449d334a4c2fa69c753bd
Parents: c8c0565
Author: Evans Ye <[email protected]>
Authored: Thu Dec 13 18:32:02 2018 +0800
Committer: Evans Ye <[email protected]>
Committed: Fri Dec 21 14:43:44 2018 +0800

----------------------------------------------------------------------
 .../puppet/hieradata/bigtop/cluster.yaml        |  2 ++
 .../modules/hadoop_hive/manifests/init.pp       |  1 +
 .../modules/hadoop_hive/templates/hive-site.xml | 22 ++++++++++++++++++++
 3 files changed, 25 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/c02f4947/bigtop-deploy/puppet/hieradata/bigtop/cluster.yaml
----------------------------------------------------------------------
diff --git a/bigtop-deploy/puppet/hieradata/bigtop/cluster.yaml 
b/bigtop-deploy/puppet/hieradata/bigtop/cluster.yaml
index e9f3ff8..0bf81e6 100644
--- a/bigtop-deploy/puppet/hieradata/bigtop/cluster.yaml
+++ b/bigtop-deploy/puppet/hieradata/bigtop/cluster.yaml
@@ -174,6 +174,8 @@ giraph::client::zookeeper_quorum: 
"%{hiera('bigtop::hadoop_head_node')}"
 hadoop_hive::common_config::hbase_zookeeper_quorum: 
"%{hiera('hadoop_hbase::common_config::zookeeper_quorum')}"
 hadoop_hive::common_config::kerberos_realm: "%{hiera('kerberos::site::realm')}"
 hadoop_hive::common_config::metastore_uris: 
"thrift://%{hiera('bigtop::hadoop_head_node')}:9083"
+# set this to true in production to avoid potential metastore corruption
+hadoop_hive::common_config::metastore_schema_verification: false
 
 # tez
 hadoop::common::tez_conf_dir: "/etc/tez/conf"

http://git-wip-us.apache.org/repos/asf/bigtop/blob/c02f4947/bigtop-deploy/puppet/modules/hadoop_hive/manifests/init.pp
----------------------------------------------------------------------
diff --git a/bigtop-deploy/puppet/modules/hadoop_hive/manifests/init.pp 
b/bigtop-deploy/puppet/modules/hadoop_hive/manifests/init.pp
index 35c06179..765cd08 100644
--- a/bigtop-deploy/puppet/modules/hadoop_hive/manifests/init.pp
+++ b/bigtop-deploy/puppet/modules/hadoop_hive/manifests/init.pp
@@ -51,6 +51,7 @@ class hadoop_hive {
                        $hive_support_concurrency = false,
                        $kerberos_realm = "",
                        $metastore_uris = "",
+                       $metastore_schema_verification = true,
                        $server2_thrift_port = "10000",
                        $server2_thrift_http_port = "10001",
                        $hive_execution_engine = "mr") {

http://git-wip-us.apache.org/repos/asf/bigtop/blob/c02f4947/bigtop-deploy/puppet/modules/hadoop_hive/templates/hive-site.xml
----------------------------------------------------------------------
diff --git a/bigtop-deploy/puppet/modules/hadoop_hive/templates/hive-site.xml 
b/bigtop-deploy/puppet/modules/hadoop_hive/templates/hive-site.xml
index ff1fb92..bdce629 100644
--- a/bigtop-deploy/puppet/modules/hadoop_hive/templates/hive-site.xml
+++ b/bigtop-deploy/puppet/modules/hadoop_hive/templates/hive-site.xml
@@ -142,4 +142,26 @@
     <value>true</value>
 </property>
 <% end %> 
+
+<property>
+  <name>hive.metastore.schema.verification</name>
+   <value><%= @metastore_schema_verification %></value>
+  <description>
+    Enforce metastore schema version consistency.
+    True: Verify that version information stored in is compatible with one 
from Hive jars.  Also disable automatic
+          schema migration attempt. Users are required to manually migrate 
schema after Hive upgrade which ensures
+          proper metastore schema migration. (Default)
+    False: Warn if the version information stored in metastore doesn't match 
with one from in Hive jars.
+  </description>
+</property>
+<% if @metastore_schema_verification == false %>
+<property>
+   <name>datanucleus.schema.autoCreateAll</name>
+   <value>true</value>
+  <description>
+    Creates necessary schema on a startup if one does not exist. Reset this to 
false, after creating it once.
+    datanucleus.schema.autoCreateAll is disabled if 
hive.metastore.schema.verification is true.
+  </description>
+</property>
+<% end %>
 </configuration>

Reply via email to