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?鐜鍙橀噺
- export?HBASE_HOME=/hadoop/hbase-1.2.6??
- export?PATH=$PATH:$HBASE_HOME/bin??
?
2.vi /hadoop/hbase-1.2.6/conf/hbase-site.xml
- <property>??
- ? ??<name>hbase.rootdir</name>??
- ? ??<value>hdfs://cluster_name/hbase</value>??
- <description>涓€瀹氳鎶奾adoop涓殑core-site.xml鍜宧df-site.xml澶嶅埗鍒癶base鐨刢onf鐩綍涓嬶紝鎵嶈兘鎴愬姛瑙f瀽璇ラ泦缇ゅ悕绉帮紱濡傛灉鏄痟adoop鍗昻amenode闆嗙兢锛岄厤缃啓鎴恏dfs://master:9000/hbase (master鏄痭amenode涓绘満鍚?</description>?
- </property>??
- <property>??
- ? ??<name>hbase.cluster.distributed</name>??
- ? ??<value>true</value>??
- </property>??
- <property>??
- ? ? ??<name>hbase.zookeeper.quorum</name>??
- ? ? ??<value>master,node1,node2</value>??
- </property>
- <property>??
- ? ? ??<name>hbase.zookeeper.property.dataDir</name>#闇€瑕佷笌zookeeper闆嗙兢涓婇厤缃竴鏍?/span>??
- ? ? ??<value>/hadoop/zookeeper</value>??
- </property>??
?
3.vi /hadoop/hbase-1.2.6/conf/hbase-env.sh
- export?JAVA_HOME=/usr/java/jdk1.8.0_65??
- export?HBASE_MANAGES_ZK=false??
?
4.vi /hadoop/hbase-1.2.6/conf/regionservers
- node1??
- 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闆嗙兢鎼缓閮ㄥ垎閰嶇疆的主要内容,如果未能解决你的问题,请参考以下文章