HBase operating mode: single instance and distributed
HBase operating mode: single instance and distributed
1.1 Single instance under HDFS
HBase has 2 operating modes, single instance and distributed.
1. Single instance mode
This is the default mode. See quickstart for a description of singletons . In single instance mode, hbase does not use HDFS , all HBase daemons are under one JVM . Zookeeper binds to all known ports to allow clients to communicate with HBase .
1.1 Single instance under HDFS
Edit hbase-site.xml and configure the hbase.rootdir parameter to point to the hdfs instance.
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://namenode.example.org:8020/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>false</value>
</property>
</configuration>
2. Distributed
The distributed mode can be subdivided into distributed. instead of being placed under the same node . This is also the difference between pseudo-distributed and distributed. Pseudo-distribution can be on the local filesystem or on hdfs . But distributed must be on hdfs .
2.1 Pseudo-distributed
slightly
3 Fully distributed
By default, HBase runs in single instance mode. Single instance or pseudo-distribution is for small-scale testing. For production environments, you still need to use distributed. Under distributed, multiple hbase instances run on multiple servers to form a cluster.
和伪分布式一样分布式,也是需要设置hbase.cluster.distributed为true。吧hbase.rootdir指向高可用的HDFS文件系统。
另外集群配置后多个集群节点有RegionServer,Zookeeper QuorumPeers,backup HMaster servers。
分布的RegionServer
通常集群包含多个RegionServer运行在不同的服务器上,包括backup master,Zookeeper。Conf/regionservers文件中包含了RegionServer的host列表。每个host一行。所有文件中的host随着master的启动关闭而启动关闭。
Zookeeper和HBase
HBase的Zookeeper查看: ZooKeeper
过程:HDFS Client配置
1.如果你有HDFS客户端配置,那么就需要让HBase知道配置的修改:
a.在hbase-env.sh中配置HADOOP_CONF_DIR到HBASE_CLASSPATH。
b.复制hdfs-site.xml或者创建一个连接在hbase的配置文件夹下。
c.如果只有一点点配置,也可以直接设置到hbase-site.xml上。