HBase闆嗙兢鎼缓閮ㄥ垎閰嶇疆

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了HBase闆嗙兢鎼缓閮ㄥ垎閰嶇疆相关的知识,希望对你有一定的参考价值。

鏍囩锛?a href='http://www.mamicode.com/so/1/%e7%9b%b8%e5%85%b3%e9%85%8d%e7%bd%ae' title='鐩稿叧閰嶇疆'>鐩稿叧閰嶇疆   鎵撳紑   strong   clu   spl   绾跨▼   鏈€澶х殑   prope   杩愯   

鍓嶆湡鍑嗗锛歨adoop HA鐜宸叉惌寤烘垚鍔燂紝zookeeper鑳芥甯歌繍琛屻€?/p>

瀹夎娴佺▼锛?/strong>

1.瑙e帇tar -zxvf hbase-1.2.6-bin.tar.gz? 锛堝綋鍓?.2.*鐗堟湰鏈€涓虹ǔ瀹氾紝1.3.*杩樺湪浼樺寲涓級

???vi /etc/profile?鐜鍙橀噺

  1. export?HBASE_HOME=/hadoop/hbase-1.2.6??
  2. export?PATH=$PATH:$HBASE_HOME/bin??

?

2.vi /hadoop/hbase-1.2.6/conf/hbase-site.xml

  1. <property>??
  2. ? ??<name>hbase.rootdir</name>??
  3. ? ??<value>hdfs://cluster_name/hbase</value>??
  4. <description>涓€瀹氳鎶奾adoop涓殑core-site.xml鍜宧df-site.xml澶嶅埗鍒癶base鐨刢onf鐩綍涓嬶紝鎵嶈兘鎴愬姛瑙f瀽璇ラ泦缇ゅ悕绉帮紱濡傛灉鏄痟adoop鍗昻amenode闆嗙兢锛岄厤缃啓鎴恏dfs://master:9000/hbase (master鏄痭amenode涓绘満鍚?</description>?
  5. </property>??
  6. <property>??
  7. ? ??<name>hbase.cluster.distributed</name>??
  8. ? ??<value>true</value>??
  9. </property>??
  10. <property>??
  11. ? ? ??<name>hbase.zookeeper.quorum</name>??
  12. ? ? ??<value>master,node1,node2</value>??
  13. </property>
  14. <property>??
  15. ? ? ??<name>hbase.zookeeper.property.dataDir</name>#闇€瑕佷笌zookeeper闆嗙兢涓婇厤缃竴鏍?/span>??
  16. ? ? ??<value>/hadoop/zookeeper</value>??
  17. </property>??

?

3.vi /hadoop/hbase-1.2.6/conf/hbase-env.sh

  1. export?JAVA_HOME=/usr/java/jdk1.8.0_65??
  2. export?HBASE_MANAGES_ZK=false??

?

4.vi /hadoop/hbase-1.2.6/conf/regionservers

  1. node1??
  2. node2??

鎻愰啋锛?em>鐢变簬hadoop鍋氫簡HA锛宯amenode鍙兘杩涜鍒囨崲锛屼负浜嗚В鏋愰泦缇ゅ悕绉帮紝蹇呴』鎶?/em>hadoop鐨刢ore-site.xml鍜宧dfs-site.xml鎷疯礉鍒癶base鐨刢onf涓嬶紝鐒跺悗鍚姩hbase銆?/em>

?

5.鍚姩

???cd /hadoop/hbase-1.2.6/bin

?? ./start-hbase.sh

?

Web UI: 绋冲畾鐗坔base1.2.*绯诲垪榛樿鐨剋eb UI绔彛涓?6010锛屽湪缃戝潃鍐呰緭鍏master涓绘満 ip:16010 鍗冲彲璁块棶锛堝hbase鐗堟湰涓嶅悓瀵艰嚧鏃犳硶鎵撳紑web UI锛屽彲鍘诲畼缃戞枃妗f煡鐪嬪搴旂増鏈殑榛樿绔彛鍙凤級銆?/strong>

?

鍑犱釜鍛戒护锛?/strong>

鍚姩鎵€鏈夎妭鐐癸細start-hbase.sh

鍏抽棴鎵€鏈夎妭鐐癸細stop-hbase.sh

鍚姩鍗曞彴鑺傜偣锛歨base-daemon.sh start master/regionserver

鍏抽棴鍗曞彴鑺傜偣锛歨base-daemon.sh stop master/regionserver

hbase-site.xml鍏朵粬鐩稿叧閰嶇疆

 <!-- hbase瀹㈡埛绔痳pc鎵弿涓€娆¤幏鍙栫殑琛屾暟,榛樿鏄?147483647锛?-->

??? <property>

???????<name>hbase.client.scanner.caching</name>

??????? <value>2000</value>

??? </property>

??? <!-- HRegion鍒嗚鍓嶆渶澶х殑鏂囦欢澶у皬(榛樿1.25G)-->

??? <property>

???????<name>hbase.hregion.max.filesize</name>

??????? <value>10737418240</value>

??? </property>

??? <!-- HRegionServer涓渶澶х殑region鏁伴噺 -->

??? <property>

???????<name>hbase.regionserver.reginoSplitLimit</name>

??????? <value>2000</value>

??? </property>

??? <!-- StoreFile寮€濮嬪悎骞剁殑闃€鍊?-->

??? <property>

???? ???<name>hbase.hstore.compactionThreshold</name>

??????? <value>6</value>

??? </property>

??? <!-- 褰撴煇涓€涓猺egion鐨剆torefile涓暟杈惧埌璇ュ€煎垯block鍐欏叆锛岀瓑寰卌ompact-->

??? <property>

???????<name>hbase.hstore.blockingStoreFiles</name>

??????? <value>14</value>

??? </property>

??? <!--褰揗emStore鍗犵敤鍐呭瓨澶у皬瓒呰繃hbase.hregion.memstore.flush.size

??? MemStore鍒锋柊缂撳瓨鐨勫ぇ灏忕殑4鍊嶏紝寮€濮嬩腑block璇Region鐨勮姹傦紝杩涜flush

??? 閲婃斁鍐呭瓨锛屽悗鍙颁細鏈夋湇鍔$嚎绋嬪湪鍛ㄦ湡鍐卙base.server.thread.wakefrequency

??? 瀹氭椂妫€鏌?->

??? <property>

???????<name>hbase.hregion.memstore.block.multiplier</name>

??????? <value>4</value>

??? </property>

??? <!-- service宸ヤ綔鐨剆leep闂撮殧 -->

??? <property>

???????<name>hbase.server.thread.wakefrequency</name>

??????? <value>500</value>

??? </property>

??? <!--ZK骞跺彂杩炴帴鐨勯檺鍒?->

??? <property>

??????? <name>hbase.zookeeper.property.maxClientCnxns</name>

??????? <value>300</value>

??? </property>

??? <!--RegionServer杩涚▼block杩涜flush瑙﹀彂鏉′欢锛氳鑺傜偣涓婃墍鏈塺egion鐨刴emstore涔嬪拰杈惧埌upperLimit*heapsize-->

??? <property>

???????<name>hbase.regionserver.global.memstore.size</name>

??????? <value>0.4</value>

??? </property>

??? <!--RegionServer杩涚▼瑙﹀彂flush鐨勪竴涓潯浠讹細璇ヨ妭鐐逛笂鎵€鏈塺egion鐨刴emstore涔嬪拰杈惧埌lowerLimit*heapsize-->

??? <property>

???????<name>hbase.regionserver.global.memstore.size.lower.limit</name>

??????? <value>0.3</value>

??? </property>

??? <property>

??????? <name>hfile.block.cache.size</name>

??????? <value>0.4</value>

??? </property>

??? <!--HRegionserver澶勭悊IO璇锋眰鐨勭嚎绋嬫暟-->

??? <property>

???????<name>hbase.regionserver.handler.count</name>

??????? <value>100</value>

??? </property>

??? <!-- 瀹㈡埛绔渶澶ч噸璇曟鏁?-->

??? <property>

???????<name>hbase.client.retries.number</name>

??????? <value>5</value>

??? </property>

??? <!-- 瀹㈡埛绔噸璇曠殑浼戠湢鏃堕棿 -->

??? <property>

???????<name>hbase.client.pause</name>

??????? <value>100</value>

??? </property>

以上是关于HBase闆嗙兢鎼缓閮ㄥ垎閰嶇疆的主要内容,如果未能解决你的问题,请参考以下文章

k8s闆嗙兢鎼缓-鏂?浠ュ強k8s鐩稿叧鍛戒护璇︽儏

闆跺熀纭€瀛ginx銆?銆憒 Nginx 甯哥敤鐨勫懡浠ゅ拰閰嶇疆鏂囦欢

flink1.10 Linux 闆嗙兢瀹夎

Docker涔媠warm閮ㄧ讲闆嗙兢

Redis闆嗙兢閮芥湁鍝簺妯″紡

linux闆嗙兢