You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by hi...@apache.org on 2012/08/18 03:38:10 UTC
svn commit: r1374498 - in /incubator/ambari/trunk: CHANGES.txt
hmc/puppet/modules/hdp-hbase/manifests/params.pp
hmc/puppet/modules/hdp-hbase/templates/hbase-env.sh.erb
hmc/puppet/modules/hdp/lib/puppet/parser/functions/hdp_calc_xmn_from_xms.rb
Author: hitesh
Date: Sat Aug 18 01:38:09 2012
New Revision: 1374498
URL: http://svn.apache.org/viewvc?rev=1374498&view=rev
Log:
AMBARI-672. Hardcoded -Xmn value for hbase causes region servers to fail to start in machines with less memory (Contributed by hitesh)
Added:
incubator/ambari/trunk/hmc/puppet/modules/hdp/lib/puppet/parser/functions/hdp_calc_xmn_from_xms.rb (with props)
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/hmc/puppet/modules/hdp-hbase/manifests/params.pp
incubator/ambari/trunk/hmc/puppet/modules/hdp-hbase/templates/hbase-env.sh.erb
Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1374498&r1=1374497&r2=1374498&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Sat Aug 18 01:38:09 2012
@@ -147,6 +147,9 @@ Trunk (unreleased changes)
Release 0.9.0
+ AMBARI-672. Hardcoded -Xmn value for hbase causes region servers to fail to start in
+ machines with less memory (hitesh)
+
AMBARI-667. After reboots, namenode start fails as it thinks dfs is not formatted (hitesh)
AMBARI-668. Ambari should install yum priorities plugin on all nodes to ensure repo
Modified: incubator/ambari/trunk/hmc/puppet/modules/hdp-hbase/manifests/params.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/puppet/modules/hdp-hbase/manifests/params.pp?rev=1374498&r1=1374497&r2=1374498&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/puppet/modules/hdp-hbase/manifests/params.pp (original)
+++ incubator/ambari/trunk/hmc/puppet/modules/hdp-hbase/manifests/params.pp Sat Aug 18 01:38:09 2012
@@ -36,9 +36,10 @@ class hdp-hbase::params() inherits hdp::
$hbase_regionserver_heapsize = hdp_default("hadoop/hbase-env/hbase_regionserver_heapsize","1000m")
+ $hbase_regionserver_xmn_size = hdp_calc_xmn_from_xms("$hbase_regionserver_heapsize","0.2","512")
### hbase-site.xml
- $hbase_hdfs_root_dir = $hdp::params::hbase_hdfs_root_dir
+ $hbase_hdfs_root_dir = hdp_default("hadoop/hbase-site/hbase_hdfs_root_dir","/apps/hbase/data")
$hbase_tmp_dir = hdp_default("hadoop/hbase-site/hbase_tmp_dir","$hbase_log_dir")
Modified: incubator/ambari/trunk/hmc/puppet/modules/hdp-hbase/templates/hbase-env.sh.erb
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/puppet/modules/hdp-hbase/templates/hbase-env.sh.erb?rev=1374498&r1=1374497&r2=1374498&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/puppet/modules/hdp-hbase/templates/hbase-env.sh.erb (original)
+++ incubator/ambari/trunk/hmc/puppet/modules/hdp-hbase/templates/hbase-env.sh.erb Sat Aug 18 01:38:09 2012
@@ -45,7 +45,7 @@ export HBASE_OPTS="-ea -XX:+UseConcMarkS
#
# export HBASE_JMX_BASE="-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
export HBASE_MASTER_OPTS="-Xmx<%=scope.function_hdp_template_var("hbase_master_heapsize")%>"
-export HBASE_REGIONSERVER_OPTS="-server -XX:ParallelGCThreads=4 -XX:+UseParNewGC -Xmn512m -XX:CMSInitiatingOccupancyFraction=80 -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xloggc:<%=scope.function_hdp_template_var("hbase_log_dir")%>/log/$USER/gc.log-`date +'%Y%m%d%H%M'` -Xms<%=scope.function_hdp_template_var("hbase_regionserver_heapsize")%> -Xmx<%=scope.function_hdp_template_var("hbase_regionserver_heapsize")%> -XX:ErrorFile=<%=scope.function_hdp_template_var("hbase_log_dir")%>/log/$USER/hs_err_pid%p.log"
+export HBASE_REGIONSERVER_OPTS="-server -XX:ParallelGCThreads=4 -XX:+UseParNewGC -Xmn<%=scope.function_hdp_template_var("hbase_regionserver_xmn_size")%> -XX:CMSInitiatingOccupancyFraction=80 -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xloggc:<%=scope.function_hdp_template_var("hbase_log_dir")%>/log/$USER/gc.log-`date +'%Y%m%d%H%M'` -Xms<%=scope.function_hdp_template_var("hbase_regionserver_heapsize")%> -Xmx<%=scope.function_hdp_template_var("hbase_regionserver_heapsize")%> -XX:ErrorFile=<%=scope.function_hdp_template_var("hbase_log_dir")%>/log/$USER/hs_err_pid%p.log"
# export HBASE_THRIFT_OPTS="$HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10103"
# export HBASE_ZOOKEEPER_OPTS="$HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10104"
Added: incubator/ambari/trunk/hmc/puppet/modules/hdp/lib/puppet/parser/functions/hdp_calc_xmn_from_xms.rb
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/puppet/modules/hdp/lib/puppet/parser/functions/hdp_calc_xmn_from_xms.rb?rev=1374498&view=auto
==============================================================================
--- incubator/ambari/trunk/hmc/puppet/modules/hdp/lib/puppet/parser/functions/hdp_calc_xmn_from_xms.rb (added)
+++ incubator/ambari/trunk/hmc/puppet/modules/hdp/lib/puppet/parser/functions/hdp_calc_xmn_from_xms.rb Sat Aug 18 01:38:09 2012
@@ -0,0 +1,37 @@
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+module Puppet::Parser::Functions
+ newfunction(:hdp_calc_xmn_from_xms, :type => :rvalue) do |args|
+ heapsize_orig_str = args[0].to_s
+ xmn_percent = args[1].to_f
+ xmn_max = args[2].to_i
+ heapsize_str = heapsize_orig_str.gsub(/\D/,"")
+ heapsize = heapsize_str.to_i
+ heapsize_unit = heapsize_orig_str.gsub(/\d/,"")
+ xmn_val = heapsize*xmn_percent
+ xmn_val = xmn_val.floor.to_i
+ xmn_val = xmn_val/8
+ xmn_val = xmn_val*8
+ xmn_val = xmn_val > xmn_max ? xmn_max : xmn_val
+ xmn_val_str = "" + xmn_val.to_s + heapsize_unit
+ xmn_val_str
+ end
+end
Propchange: incubator/ambari/trunk/hmc/puppet/modules/hdp/lib/puppet/parser/functions/hdp_calc_xmn_from_xms.rb
------------------------------------------------------------------------------
svn:eol-style = native