W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
在下文內(nèi)容中是一個(gè)分布式10節(jié)點(diǎn)的群集的基本配置示例:其中,節(jié)點(diǎn)被命名為example0,example1...一直到example9,在這個(gè)例子中;HBase Master和HDFS NameNode正在節(jié)點(diǎn)example0上運(yùn)行;RegionServers在節(jié)點(diǎn)example1- example9上運(yùn)行;一個(gè)3節(jié)點(diǎn)ZooKeeper集合運(yùn)行在example1、example2,以及example3的默認(rèn)端口上;ZooKeeper的數(shù)據(jù)被保存到:directory/export/zookeeper。
下面我們顯示在HBase conf目錄中找到的主要配置文件? -hbase-site.xml,regionservers和hbase-env.sh。
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>hbase.zookeeper.quorum</name>
<value>example1,example2,example3</value>
<description>The directory shared by RegionServers.
</description>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/export/zookeeper</value>
<description>Property from ZooKeeper config zoo.cfg.
The directory where the snapshot is stored.
</description>
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://example0:8020/hbase</value>
<description>The directory shared by RegionServers.
</description>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
<description>The mode the cluster will be in. Possible values are
false: standalone and pseudo-distributed setups with managed ZooKeeper
true: fully-distributed with unmanaged ZooKeeper Quorum (see hbase-env.sh)
</description>
</property>
</configuration>
在此文件中列出將運(yùn)行RegionServers的節(jié)點(diǎn)。在我們的例子中,這些節(jié)點(diǎn)是example1- example9。
example1
example2
example3
example4
example5
example6
example7
example8
example9
hbase-env.sh文件中的以下行顯示了如何設(shè)置JAVA_HOME環(huán)境變量(HBase需要的)并將堆設(shè)置為4 GB(而不是默認(rèn)值1 GB)。如果您復(fù)制并粘貼此示例,請(qǐng)務(wù)必調(diào)整JAVA_HOME以適合您的環(huán)境。
# The java implementation to use.
export JAVA_HOME=/usr/java/jdk1.8.0/
# The maximum amount of heap to use. Default is left to JVM default.
export HBASE_HEAPSIZE=4G
使用rsync將conf目錄的內(nèi)容復(fù)制到群集的所有節(jié)點(diǎn)。
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: