diff options
author | Roman Shaposhnik <rvs@apache.org> | 2016-11-07 13:54:17 -0800 |
---|---|---|
committer | Roman Shaposhnik <rvs@apache.org> | 2016-11-07 23:32:39 -0800 |
commit | 0c82c31f77fee6f749a1295e20fd3cd8d20c2c4a (patch) | |
tree | e4fa0d621634ef8e2f8c4d384282993ecb664830 /bigtop-deploy/puppet | |
parent | 35fdeb83bf21f56580d3778211209fb2927e858d (diff) |
BIGTOP-2578. Puppet needs to be updated for Hive Server2
Diffstat (limited to 'bigtop-deploy/puppet')
5 files changed, 93 insertions, 9 deletions
diff --git a/bigtop-deploy/puppet/hieradata/bigtop/cluster.yaml b/bigtop-deploy/puppet/hieradata/bigtop/cluster.yaml index 49904c66..89ac967f 100644 --- a/bigtop-deploy/puppet/hieradata/bigtop/cluster.yaml +++ b/bigtop-deploy/puppet/hieradata/bigtop/cluster.yaml @@ -186,7 +186,8 @@ hue::server::kerberos_realm: "%{hiera('kerberos::site::realm')}" giraph::client::zookeeper_quorum: "%{hiera('bigtop::hadoop_head_node')}" -hadoop_hive::client::hbase_zookeeper_quorum: "%{hiera('hadoop_hbase::common_config::zookeeper_quorum')}" +hadoop_hive::common_config::hbase_zookeeper_quorum: "%{hiera('hadoop_hbase::common_config::zookeeper_quorum')}" +hadoop_hive::common_config::kerberos_realm: "%{hiera('kerberos::site::realm')}" # tez hadoop::common::tez_conf_dir: "/etc/tez/conf" @@ -197,7 +198,7 @@ hadoop::common::tez_jars: "/usr/lib/tez" # hadoop::common_mapred_app::mapreduce_framework_name: "yarn-tez" # to enable tez in hive, uncomment the lines below -# hadoop_hive::client::hive_execution_engine: "tez" +# hadoop_hive::common_config::hive_execution_engine: "tez" #kafka kafka::server::port: "9092" diff --git a/bigtop-deploy/puppet/manifests/cluster.pp b/bigtop-deploy/puppet/manifests/cluster.pp index 7144f02b..7d31ef94 100644 --- a/bigtop-deploy/puppet/manifests/cluster.pp +++ b/bigtop-deploy/puppet/manifests/cluster.pp @@ -97,6 +97,7 @@ $roles_map = { client => ["pig-client"], }, hive => { + master => ["hive-server2"], client => ["hive-client"], }, tez => { diff --git a/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp b/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp index 3d357bcc..a8a8152e 100644 --- a/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp +++ b/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp @@ -19,9 +19,10 @@ class hadoop ($hadoop_security_authentication = "simple", # Set from facter if available $hadoop_storage_dirs = split($::hadoop_storage_dirs, ";"), $proxyusers = { - oozie => { groups => 'hudson,testuser,root,hadoop,jenkins,oozie,httpfs,hue,users', hosts => "*" }, - hue => { groups => 'hudson,testuser,root,hadoop,jenkins,oozie,httpfs,hue,users', hosts => "*" }, - httpfs => { groups => 'hudson,testuser,root,hadoop,jenkins,oozie,httpfs,hue,users', hosts => "*" } }, + oozie => { groups => 'hudson,testuser,root,hadoop,jenkins,oozie,hive,httpfs,hue,users', hosts => "*" }, + hive => { groups => 'hudson,testuser,root,hadoop,jenkins,oozie,hive,httpfs,hue,users', hosts => "*" }, + hue => { groups => 'hudson,testuser,root,hadoop,jenkins,oozie,hive,httpfs,hue,users', hosts => "*" }, + httpfs => { groups => 'hudson,testuser,root,hadoop,jenkins,oozie,hive,httpfs,hue,users', hosts => "*" } }, $generate_secrets = false, ) { diff --git a/bigtop-deploy/puppet/modules/hadoop_hive/manifests/init.pp b/bigtop-deploy/puppet/modules/hadoop_hive/manifests/init.pp index 86131ff2..4b10a25a 100644 --- a/bigtop-deploy/puppet/modules/hadoop_hive/manifests/init.pp +++ b/bigtop-deploy/puppet/modules/hadoop_hive/manifests/init.pp @@ -19,19 +19,66 @@ class hadoop_hive { if ("hive-client" in $roles) { include hadoop_hive::client } - } - class client($hbase_master = "", - $hbase_zookeeper_quorum = "", - $hive_execution_engine = "mr") { + if ("hive-server2" in $roles) { + include hadoop_hive::server2 + + # include hadoop::init_hdfs + # Class['Hadoop::Init_hdfs'] -> Class['Hadoop_hive::Server2'] + # if ("mapred-app" in $roles) { + # Class['Hadoop::Mapred_app'] -> Class['Hadoop_hive::Server2'] + # } + } + } + class client_package { package { "hive": ensure => latest, } + } + + class common_config ($hbase_master = "", + $hbase_zookeeper_quorum = "", + $kerberos_realm = "", + $server2_thrift_port = "10000", + $server2_thrift_http_port = "10001", + $hive_execution_engine = "mr") { + include hadoop_hive::client_package + if ($kerberos_realm) { + require kerberos::client + kerberos::host_keytab { "hive": + spnego => true, + require => Package["hive"], + } + } file { "/etc/hive/conf/hive-site.xml": content => template('hadoop_hive/hive-site.xml'), require => Package["hive"], } } + + class client($hbase_master = "", + $hbase_zookeeper_quorum = "", + $hive_execution_engine = "mr") { + + include hadoop_hive::common_config + } + + class server2 { + include hadoop_hive::common_config + + package { "hive-server2": + ensure => latest, + } + + service { "hive-server2": + ensure => running, + require => Package["hive-server2"], + subscribe => File["/etc/hive/conf/hive-site.xml"], + hasrestart => true, + hasstatus => true, + } + Kerberos::Host_keytab <| title == "hive" |> -> Service["hive-server2"] + } } 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 2aca237e..a9730553 100644 --- a/bigtop-deploy/puppet/modules/hadoop_hive/templates/hive-site.xml +++ b/bigtop-deploy/puppet/modules/hadoop_hive/templates/hive-site.xml @@ -65,4 +65,38 @@ <description>This is the WAR file with the jsp content for Hive Web Interface</description> </property> +<property> + <name>hive.server2.allow.user.substitution</name> + <value>true</value> +</property> + +<property> + <name>hive.server2.enable.doAs</name> + <value>true</value> +</property> + +<property> + <name>hive.server2.thrift.port</name> + <value><%= @server2_thrift_port %></value> +</property> + +<property> + <name>hive.server2.thrift.http.port</name> + <value><%= @server2_thrift_http_port %></value> +</property> + +<% if @kerberos_realm != "" %> +<property> + <name>hive.server2.authentication</name> + <value>KERBEROS</value> +</property> +<property> + <name>hive.server2.authentication.kerberos.principal</name> + <value>hive/_HOST@<%= @kerberos_realm %></value> +</property> +<property> + <name>hive.server2.authentication.kerberos.keytab</name> + <value>/etc/hive.keytab</value> +</property> +<% end %> </configuration> |