ams-hbase-env.xml 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <?xml version="1.0"?>
  2. <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
  3. <!--
  4. /**
  5. * Licensed to the Apache Software Foundation (ASF) under one
  6. * or more contributor license agreements. See the NOTICE file
  7. * distributed with this work for additional information
  8. * regarding copyright ownership. The ASF licenses this file
  9. * to you under the Apache License, Version 2.0 (the
  10. * "License"); you may not use this file except in compliance
  11. * with the License. You may obtain a copy of the License at
  12. *
  13. * http://www.apache.org/licenses/LICENSE-2.0
  14. *
  15. * Unless required by applicable law or agreed to in writing, software
  16. * distributed under the License is distributed on an "AS IS" BASIS,
  17. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18. * See the License for the specific language governing permissions and
  19. * limitations under the License.
  20. */
  21. -->
  22. <configuration supports_adding_forbidden="true">
  23. <property>
  24. <name>hbase_log_dir</name>
  25. <value>/var/log/ambari-metrics-collector</value>
  26. <description>Log Directories for HBase.</description>
  27. <depends-on>
  28. <property>
  29. <type>ams-env</type>
  30. <name>metrics_collector_log_dir</name>
  31. </property>
  32. </depends-on>
  33. <value-attributes>
  34. <type>directory</type>
  35. </value-attributes>
  36. </property>
  37. <property>
  38. <name>hbase_pid_dir</name>
  39. <value>/var/run/ambari-metrics-collector/</value>
  40. <description>Pid Directory for HBase.</description>
  41. <value-attributes>
  42. <type>directory</type>
  43. </value-attributes>
  44. </property>
  45. <property>
  46. <name>hbase_classpath_additional</name>
  47. <value></value>
  48. <description>Additional directory or jar in classpath for HBase.</description>
  49. <value-attributes>
  50. <empty-value-valid>true</empty-value-valid>
  51. </value-attributes>
  52. </property>
  53. <property>
  54. <name>hbase_regionserver_heapsize</name>
  55. <value>768</value>
  56. <description>
  57. HBase RegionServer Heap Size. In embedded mode, total heap size is
  58. sum of master and regionserver heap sizes.
  59. </description>
  60. <value-attributes>
  61. <type>int</type>
  62. <unit>MB</unit>
  63. </value-attributes>
  64. <depends-on>
  65. <property>
  66. <type>ams-hbase-site</type>
  67. <name>hbase.cluster.distributed</name>
  68. </property>
  69. <property>
  70. <type>ams-hbase-site</type>
  71. <name>hbase.rootdir</name>
  72. </property>
  73. </depends-on>
  74. </property>
  75. <property>
  76. <name>regionserver_xmn_size</name>
  77. <value>128</value>
  78. <description>HBase RegionServer maximum value for young generation heap size.</description>
  79. <value-attributes>
  80. <type>int</type>
  81. <unit>MB</unit>
  82. </value-attributes>
  83. <depends-on>
  84. <property>
  85. <type>ams-hbase-site</type>
  86. <name>hbase.cluster.distributed</name>
  87. </property>
  88. </depends-on>
  89. </property>
  90. <property>
  91. <name>hbase_master_xmn_size</name>
  92. <value>102</value>
  93. <description>
  94. HBase Master maximum value for young generation heap size.
  95. </description>
  96. <value-attributes>
  97. <type>int</type>
  98. <unit>MB</unit>
  99. </value-attributes>
  100. <depends-on>
  101. <property>
  102. <type>ams-hbase-site</type>
  103. <name>hbase.cluster.distributed</name>
  104. </property>
  105. </depends-on>
  106. </property>
  107. <property>
  108. <name>hbase_master_maxperm_size</name>
  109. <value>128</value>
  110. <description>HBase RegionServer maximum value for perm heap size.</description>
  111. <value-attributes>
  112. <type>int</type>
  113. <unit>MB</unit>
  114. </value-attributes>
  115. </property>
  116. <property>
  117. <name>hbase_regionserver_xmn_ratio</name>
  118. <value>0.2</value>
  119. <description>Percentage of max heap size (-Xmx) which used for young generation heap (-Xmn).</description>
  120. </property>
  121. <property>
  122. <name>hbase_master_heapsize</name>
  123. <value>512</value>
  124. <description>
  125. HBase Master Heap Size. In embedded mode, total heap size is
  126. sum of master and regionserver heap sizes.
  127. </description>
  128. <value-attributes>
  129. <type>int</type>
  130. <unit>MB</unit>
  131. </value-attributes>
  132. <depends-on>
  133. <property>
  134. <type>ams-hbase-site</type>
  135. <name>hbase.cluster.distributed</name>
  136. </property>
  137. <property>
  138. <type>ams-hbase-site</type>
  139. <name>hbase.rootdir</name>
  140. </property>
  141. </depends-on>
  142. </property>
  143. <property>
  144. <name>max_open_files_limit</name>
  145. <value>32768</value>
  146. <description>
  147. The maximum number of open file descriptors by process
  148. </description>
  149. </property>
  150. <!-- hbase-env.sh -->
  151. <property>
  152. <name>content</name>
  153. <description>This is the jinja template for hbase-env.sh file</description>
  154. <value>
  155. # Set environment variables here.
  156. # The java implementation to use. Java 1.6+ required.
  157. export JAVA_HOME={{java64_home}}
  158. # HBase Configuration directory
  159. export HBASE_CONF_DIR=${HBASE_CONF_DIR:-{{hbase_conf_dir}}}
  160. # Extra Java CLASSPATH elements. Optional.
  161. additional_cp={{hbase_classpath_additional}}
  162. if [ -n "$additional_cp" ];
  163. then
  164. export HBASE_CLASSPATH=${HBASE_CLASSPATH}:$additional_cp
  165. else
  166. export HBASE_CLASSPATH=${HBASE_CLASSPATH}
  167. fi
  168. # The maximum amount of heap to use for hbase shell.
  169. export HBASE_SHELL_OPTS="-Xmx256m"
  170. # Extra Java runtime options.
  171. # Below are what we set by default. May only work with SUN JVM.
  172. # For more on why as well as other possible settings,
  173. # see http://wiki.apache.org/hadoop/PerformanceTuning
  174. export HBASE_OPTS="-XX:+UseConcMarkSweepGC -XX:ErrorFile={{hbase_log_dir}}/hs_err_pid%p.log -Djava.io.tmpdir={{hbase_tmp_dir}}"
  175. export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:{{hbase_log_dir}}/gc.log-`date +'%Y%m%d%H%M'`"
  176. # Uncomment below to enable java garbage collection logging.
  177. # export HBASE_OPTS="$HBASE_OPTS -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:$HBASE_HOME/logs/gc-hbase.log"
  178. # Uncomment and adjust to enable JMX exporting
  179. # See jmxremote.password and jmxremote.access in $JRE_HOME/lib/management to configure remote password access.
  180. # More details at: http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html
  181. #
  182. # export HBASE_JMX_BASE="-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
  183. {% if java_version &lt; 8 %}
  184. export HBASE_MASTER_OPTS=" -XX:PermSize=64m -XX:MaxPermSize={{hbase_master_maxperm_size}} -Xms{{hbase_heapsize}} -Xmx{{hbase_heapsize}} -Xmn{{hbase_master_xmn_size}} -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly"
  185. export HBASE_REGIONSERVER_OPTS="-XX:MaxPermSize=128m -Xmn{{regionserver_xmn_size}} -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{regionserver_heapsize}} -Xmx{{regionserver_heapsize}}"
  186. {% else %}
  187. export HBASE_MASTER_OPTS=" -Xms{{hbase_heapsize}} -Xmx{{hbase_heapsize}} -Xmn{{hbase_master_xmn_size}} -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly"
  188. export HBASE_REGIONSERVER_OPTS=" -Xmn{{regionserver_xmn_size}} -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -Xms{{regionserver_heapsize}} -Xmx{{regionserver_heapsize}}"
  189. {% endif %}
  190. # export HBASE_THRIFT_OPTS="$HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10103"
  191. # export HBASE_ZOOKEEPER_OPTS="$HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10104"
  192. # File naming hosts on which HRegionServers will run. $HBASE_HOME/conf/regionservers by default.
  193. export HBASE_REGIONSERVERS=${HBASE_CONF_DIR}/regionservers
  194. # Extra ssh options. Empty by default.
  195. # export HBASE_SSH_OPTS="-o ConnectTimeout=1 -o SendEnv=HBASE_CONF_DIR"
  196. # Where log files are stored. $HBASE_HOME/logs by default.
  197. export HBASE_LOG_DIR={{hbase_log_dir}}
  198. # A string representing this instance of hbase. $USER by default.
  199. # export HBASE_IDENT_STRING=$USER
  200. # The scheduling priority for daemon processes. See 'man nice'.
  201. # export HBASE_NICENESS=10
  202. # The directory where pid files are stored. /tmp by default.
  203. export HBASE_PID_DIR={{hbase_pid_dir}}
  204. # Seconds to sleep between slave commands. Unset by default. This
  205. # can be useful in large clusters, where, e.g., slave rsyncs can
  206. # otherwise arrive faster than the master can service them.
  207. # export HBASE_SLAVE_SLEEP=0.1
  208. # Tell HBase whether it should manage it's own instance of Zookeeper or not.
  209. export HBASE_MANAGES_ZK=false
  210. {% if security_enabled %}
  211. export HBASE_OPTS="$HBASE_OPTS -Djava.security.auth.login.config={{client_jaas_config_file}}"
  212. export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -Djava.security.auth.login.config={{master_jaas_config_file}}"
  213. export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -Djava.security.auth.login.config={{regionserver_jaas_config_file}}"
  214. export HBASE_ZOOKEEPER_OPTS="$HBASE_ZOOKEEPER_OPTS -Djava.security.auth.login.config={{ams_zookeeper_jaas_config_file}}"
  215. {% endif %}
  216. # use embedded native libs
  217. _HADOOP_NATIVE_LIB="/usr/lib/ams-hbase/lib/hadoop-native/"
  218. export HBASE_OPTS="$HBASE_OPTS -Djava.library.path=${_HADOOP_NATIVE_LIB}"
  219. # Unset HADOOP_HOME to avoid importing HADOOP installed cluster related configs like: /usr/hdp/2.2.0.0-2041/hadoop/conf/
  220. export HADOOP_HOME={{ams_hbase_home_dir}}
  221. </value>
  222. <value-attributes>
  223. <type>content</type>
  224. </value-attributes>
  225. </property>
  226. </configuration>