Created
August 15, 2017 17:37
-
-
Save aespinosa/471f2f638921918a003adc3c8da21527 to your computer and use it in GitHub Desktop.
diff between bloomberg/chef-bach#817 and aespinosa/chef-bach/proper-hive-hash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cookbooks/bcpc-hadoop/recipes/hive_config.rb b/cookbooks/bcpc-hadoop/recipes/hive_config.rb | |
index d5b3dab..98f9375 100644 | |
--- a/cookbooks/bcpc-hadoop/recipes/hive_config.rb | |
+++ b/cookbooks/bcpc-hadoop/recipes/hive_config.rb | |
@@ -31,12 +31,13 @@ stats_password = make_config('mysql-hive-table-stats-password', secure_password) | |
end | |
hive_site_vars = { | |
- is_hive_serverzzzz: node.run_list.expand(node.chef_environment).recipes.include?('bcpc-hadoop::hive_hcatalog'), | |
+ is_hive_server: node.run_list.expand(node.chef_environment).recipes.include?('bcpc-hadoop::hive_hcatalog'), | |
mysql_hosts: node['bcpc']['hadoop']['mysql_hosts'].map { |m| m[:hostname] + ':3306' }, | |
zk_hosts: node['bcpc']['hadoop']['zookeeper']['servers'], | |
hive_hosts: node['bcpc']['hadoop']['hive_hosts'], | |
stats_user: stats_user, | |
- warehouse: "#{node['bcpc']['hadoop']['hdfs_url']}/user/hive/warehouse", | |
+ warehouse: node[:bcpc][:hadoop][:hive][:warehouse][:dir], | |
+ scratch: node[:bcpc][:hadoop][:hive][:scratch][:dir], | |
metastore_keytab: "#{node['bcpc']['hadoop']['kerberos']['keytab']['dir']}/#{node['bcpc']['hadoop']['kerberos']['data']['hive']['keytab']}", | |
server_keytab: "#{node['bcpc']['hadoop']['kerberos']['keytab']['dir']}/#{node['bcpc']['hadoop']['kerberos']['data']['hive']['keytab']}", | |
kerberos_enabled: node['bcpc']['hadoop']['kerberos']['enable'], | |
@@ -73,8 +74,7 @@ hive_site_vars[:server_princ] = \ | |
"#{node['bcpc']['hadoop']['kerberos']['data']['hive']['principal']}/#{node['bcpc']['hadoop']['kerberos']['data']['hive']['princhost'] == '_HOST' ? '_HOST' : node['bcpc']['hadoop']['kerberos']['data']['hive']['princhost']}@#{node['bcpc']['hadoop']['kerberos']['realm']}" | |
end | |
-generated_values = | |
- { | |
+generated_values = { | |
'javax.jdo.option.ConnectionURL' => | |
'jdbc:mysql:loadbalance://' + | |
hive_site_vars[:mysql_hosts].join(',') + | |
@@ -104,13 +104,15 @@ generated_values = | |
'hive.metastore.warehouse.dir' => | |
hive_site_vars[:warehouse], | |
+ 'hive.exec.scratchdir' => hive_site_vars[:scratch], | |
+ | |
'hive.stats.dbconnectionstring' => | |
'jdbc:mysql:loadbalance://' + hive_site_vars[:mysql_hosts].join(',') + | |
'/hive_table_stats?useUnicode=true' \ | |
'&characterEncoding=UTF-8' \ | |
'&user=' + hive_site_vars[:stats_user] + | |
'&password=' + hive_site_vars[:stats_sql_password] | |
- } | |
+} | |
if hive_site_vars[:kerberos_enabled] && hive_site_vars[:hs2_auth] == 'KERBEROS' | |
hs2_auth_values = { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment