Elukey has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/368764 )
Change subject: hive: fix server and metastore configuration ...................................................................... hive: fix server and metastore configuration The /etc/default heap configurations for the hive metastore/server are not respected, plus no jmx configuration is provided to inspect the JVM status. Bug: T172107 Change-Id: Ib4383a4e5f414f6eba8d634a403776979432cf3f --- M manifests/hive/defaults.pp M manifests/hive/metastore.pp M manifests/hive/server.pp M templates/hive/hive-metastore.default.erb M templates/hive/hive-server2.default.erb 5 files changed, 17 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/cdh refs/changes/64/368764/1 diff --git a/manifests/hive/defaults.pp b/manifests/hive/defaults.pp index 74baa41..276077b 100644 --- a/manifests/hive/defaults.pp +++ b/manifests/hive/defaults.pp @@ -47,4 +47,8 @@ $hive_site_template = 'cdh/hive/hive-site.xml.erb' $hive_log4j_template = 'cdh/hive/hive-log4j.properties.erb' $hive_exec_log4j_template = 'cdh/hive/hive-exec-log4j.properties.erb' + + # Jmx ports + $hive_server_jmx_port = 9978 + $hive_metastore_jmx_port = 9979 } \ No newline at end of file diff --git a/manifests/hive/metastore.pp b/manifests/hive/metastore.pp index b8230ce..b2f161d 100644 --- a/manifests/hive/metastore.pp +++ b/manifests/hive/metastore.pp @@ -9,7 +9,8 @@ class cdh::hive::metastore( $port = undef, $heapsize = undef, - $default_template = 'cdh/hive/hive-metastore.default.erb' + $jmxport = $cdh::hive::defaults::$hive_metastore_jmx_port, + $default_template = 'cdh/hive/hive-metastore.default.erb', ) { Class['cdh::hive'] -> Class['cdh::hive::metastore'] diff --git a/manifests/hive/server.pp b/manifests/hive/server.pp index 77226f1..e74cc11 100644 --- a/manifests/hive/server.pp +++ b/manifests/hive/server.pp @@ -11,6 +11,7 @@ class cdh::hive::server( $port = undef, $heapsize = undef, + $jmxport = $cdh::hive::defaults::$hive_server_jmx_port, $default_template = 'cdh/hive/hive-server2.default.erb' ) { diff --git a/templates/hive/hive-metastore.default.erb b/templates/hive/hive-metastore.default.erb index c722237..c7ba65b 100644 --- a/templates/hive/hive-metastore.default.erb +++ b/templates/hive/hive-metastore.default.erb @@ -22,5 +22,9 @@ <%= @port ? "export PORT=#{@port}" : '#export PORT=' %> <% if @heapsize -%> -export HADOOP_HEAPSIZE=<%= @heapsize %> +export HADOOP_OPTS="$HADOOP_OPTS -Xmx<%= @heapsize %>" <% end -%> + +<% if @jmxport -%> +HADOOP_OPTS="$HADOOP_OPTS -Dcom.sun.management.jmxremote.port=<%= @jmxport %> -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false" +<% end -%> \ No newline at end of file diff --git a/templates/hive/hive-server2.default.erb b/templates/hive/hive-server2.default.erb index ee1e4ca..5d41898 100644 --- a/templates/hive/hive-server2.default.erb +++ b/templates/hive/hive-server2.default.erb @@ -22,5 +22,9 @@ <%= @port ? "export PORT=#{@port}" : '#export PORT=' %> <% if @heapsize -%> -export HADOOP_HEAPSIZE=<%= @heapsize %> +export HADOOP_OPTS="$HADOOP_OPTS -Xmx<%= @heapsize %>" +<% end -%> + +<% if @jmxport -%> +HADOOP_OPTS="$HADOOP_OPTS -Dcom.sun.management.jmxremote.port=<%= @jmxport %> -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false" <% end -%> -- To view, visit https://gerrit.wikimedia.org/r/368764 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib4383a4e5f414f6eba8d634a403776979432cf3f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet/cdh Gerrit-Branch: master Gerrit-Owner: Elukey <ltosc...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits