hbase-site.xml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <?xml version="1.0"?>
  2. <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
  3. <!--
  4. /**
  5. * Copyright 2010 The Apache Software Foundation
  6. *
  7. * Licensed to the Apache Software Foundation (ASF) under one
  8. * or more contributor license agreements. See the NOTICE file
  9. * distributed with this work for additional information
  10. * regarding copyright ownership. The ASF licenses this file
  11. * to you under the Apache License, Version 2.0 (the
  12. * "License"); you may not use this file except in compliance
  13. * with the License. You may obtain a copy of the License at
  14. *
  15. * http://www.apache.org/licenses/LICENSE-2.0
  16. *
  17. * Unless required by applicable law or agreed to in writing, software
  18. * distributed under the License is distributed on an "AS IS" BASIS,
  19. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  20. * See the License for the specific language governing permissions and
  21. * limitations under the License.
  22. */
  23. -->
  24. <configuration>
  25. <property>
  26. <name>hbase.rootdir</name>
  27. <value>hdfs://nowledgedata-n7:9000/hbase</value>
  28. </property>
  29. <property>
  30. <name>hbase.regionserver.dns.nameserver</name>
  31. <value>nowledgedata-n7</value>
  32. </property>
  33. <!--
  34. <property>
  35. <name>hbase.regionserver.info.bindAddress</name>
  36. <value>192.168.1.35</value>
  37. </property>
  38. -->
  39. <property>
  40. <name>hbase.tmp.dir</name>
  41. <value>/disk2/data/hbase/tmp</value>
  42. </property>
  43. <property>
  44. <name>hbase.cluster.distributed</name>
  45. <value>true</value>
  46. </property>
  47. <property>
  48. <name>hbase.master</name>
  49. <value>nowledgedata-n7:60000</value>
  50. </property>
  51. <property>
  52. <name>hbase.zookeeper.quorum</name>
  53. <value>nowledgedata-n7</value>
  54. </property>
  55. <property>
  56. <name>hbase.zookeeper.property.clientPort</name>
  57. <value>2181</value>
  58. </property>
  59. <property>
  60. <name>hbase.coprocessor.region.classes</name>
  61. <value>org.apache.hadoop.hbase.coprocessor.AggregateImplementation,com.sdyc.ndschedule.hbase.coprocessor.RowCountCoprocessor</value>
  62. </property>
  63. <!--
  64. <property>
  65. <name>hbase.coprocessor.master.classes</name>
  66. <value>coprocessor.MasterObserverExample</value>
  67. </property>
  68. <property>
  69. <name>hbase.coprocessor.wal.classes</name>
  70. <value>coprocessor.WALObserverExample, bar.foo.MyWALObserver</value>
  71. </property>
  72. -->
  73. <property>
  74. <name>zookeeper.session.timeout</name>
  75. <value>180000</value>
  76. <description>ZooKeeper Session的超时时间,调低该值可以让ZooKeeper更快的发现RegionServer的掉线。 默认为180000.</description>
  77. </property>
  78. <property>
  79. <name>hbase.master.maxclockskew</name>
  80. <value>180000</value>
  81. <description>节点机的时间和master的时间差距大于30000ms,就是30秒时无法启动服务。修改各结点时间,使其误差在30s内</description>
  82. </property>
  83. <property>
  84. <name>hbase.master.meta.thread.rescanfrequency</name>
  85. <value>10000</value>
  86. <description>How long the HMaster sleeps (in milliseconds) between scans of the root and meta tables.</description>
  87. </property>
  88. <property>
  89. <name>hbase.server.thread.wakefrequency</name>
  90. <value>10000</value>
  91. <description>Time to sleep in between searches for work (in milliseconds).Used as sleep interval by service threads such as META scanner and log roller.
  92. </description>
  93. </property>
  94. <!--
  95. 下面的是一些优化的配置
  96. -->
  97. <property>
  98. <name>hbase.regionserver.handler.count</name>
  99. <value>10</value>
  100. <description>RegionServer控制RPC程序的线程数。如果RegionServer内存较大,可适量调高该值。 默认为10.</description>
  101. </property>
  102. <property>
  103. <name>hbase.hregion.majorcompaction</name>
  104. <value>86400000</value>
  105. <description>一个区域中所有主合并之间的间隔。当设置为0时禁用自动的主合并。主合并会消耗大量IO,重负载的HBase应该禁止自动合并。默认为86400000毫秒, 即一天时间一次.
  106. </description>
  107. </property>
  108. <property>
  109. <name>hbase.hregion.memstore.flush.size</name>
  110. <value>134217728</value>
  111. <description>写入数据时,内存到达该值后一次性写入磁盘。 默认为128M.</description>
  112. </property>
  113. <property>
  114. <name>hbase.hregion.max.filesize</name>
  115. <value>1258291200</value>
  116. <description>HRegion上每个分区的大小。如果无线的增大该值,会导致Region停止分割。这个也是关闭自动分割的办法。 默认为1G.</description>
  117. </property>
  118. <property>
  119. <name>hbase.hregion.memstore.block.multiplier</name>
  120. <value>2</value>
  121. <description>某区域的MemStore的大小到达一定阈值时, HBase会对更新阻塞。该值为hbase.hregion.memstore.flush.size × hbase.hregion.memstore.block.multiplier,也就是默认在256M会发生阻塞,在写密集情况下可以提高该值。默认为2.
  122. </description>
  123. </property>
  124. <property>
  125. <name>ipc.server.tcpnodelay</name>
  126. <value>false</value>
  127. <description>true时禁止延迟, 即关闭使用缓冲区。 默认为false.</description>
  128. </property>
  129. <property>
  130. <name>ipc.client.tcpnodelay</name>
  131. <value>false</value>
  132. <description>true时禁止延迟, 即关闭使用缓冲区。 默认为false.</description>
  133. </property>
  134. <property>
  135. <name>ipc.ping.interval</name>
  136. <value>60000</value>
  137. <description>ipc ping 频率. 默一分钟。</description>
  138. </property>
  139. <property>
  140. <name>hfile.block.cache.size</name>
  141. <value>0.25</value>
  142. <description>RegionServer堆空间最大值的多少百分比分配给块缓存,默认25%</description>
  143. </property>
  144. <property>
  145. <name>hbase.client.scanner.caching</name>
  146. <value>100</value>
  147. <description>HBase对Scanner扫描缓存的数据行,在调用扫描类的next()方法时能读取到更多的行。默认为1</description>
  148. </property>
  149. <property>
  150. <name>hbase.regionserver.global.memstore.upperLimit</name>
  151. <value>0.4</value>
  152. <description>RegionServer中所有MemStore的总大小,使用超过该百分比后写操作会阻塞,并且强制写磁盘,直到占用率低于hbase.regionserver.global.memstore.lowerLimit。默认为0.4
  153. </description>
  154. </property>
  155. <property>
  156. <name>hbase.regionserver.global.memstore.lowerLimit</name>
  157. <value>0.35</value>
  158. <description>强制写磁盘后直到MemStore占用低于该百分比后停止。默认为0.35</description>
  159. </property>
  160. <property>
  161. <name>hbase.hstore.blockingStoreFiles</name>
  162. <value>7</value>
  163. <description>这个storefile就是每次memstore flush造成的,flush一次就多一个storefile,所以一个HStore里面会有多个storefile(其实就是hfile)。当StoreFile超过hbase.hstore.blockingStoreFiles的定义就会发生阻塞并且写磁盘。默认为7
  164. </description>
  165. </property>
  166. </configuration>