0012.HBase基础


06-01-NoSQL数据库简介

设计一个数据库来保存电影的信息.png


06-02-Hadoop的生态圈

Hadoop的生态体系圈.png


06-03-HBase的体系架构和表结构

HBase的体系架构.png

Oracle表结构和HBase的表结构.png


06-04-搭建HBase的本地模式

本地模式
	hbase-env.sh
		28 export JAVA_HOME=/root/training/jdk1.8.0_144
	
	hbase-site.xml
		<!--HBase数据保存的目录-->
		<property>
			 <name>hbase.rootdir</name>
			 <value>file:///root/training/hbase-1.3.1/data</value>
		</property>
		
	启动HBase:  start-hbase.sh  ----> 只会启动HMaster
hbase shell

create 'student','info','grade'

put 'student','stu001','info:name','Tom'

scan 'student'

hbase(main):002:0> scan 'student'
ROW                   COLUMN+CELL                                               
 stu001               column=info:name, timestamp=1603446903017, value=Tom      
1 row(s) in 0.0530 seconds

06-05-搭建HBase的伪分布模式

伪分布模式.png

搭建伪分布模式
hbase-env.sh
	 28 export JAVA_HOME=/root/training/jdk1.8.0_144
hbase-site.xml

	<property>
		 <name>hbase.rootdir</name>
		 <value>hdfs://192.168.16.143:9000/hbase</value>
	</property>		

	<property>
		 <name>hbase.cluster.distributed</name>
		 <value>true</value>
	</property>	

	<property>
		 <name>hbase.zookeeper.quorum</name>
		 <value>192.168.16.143</value>
	</property>		

	<property>
		 <name>dfs.replication</name>
		 <value>1</value>
	</property>
create 'student','info','grade'

put 'student','stu001','info:name','Tom'

scan 'student'

http://192.168.16.143:50070/explorer.html#/hbase

在不同的模式下HBase在ZK中保存的数据.png


06-06-使用WebConsole和命令行

WebConsole

http://192.168.16.143:16010/

原文地址:https://www.cnblogs.com/RoyalGuardsTomCat/p/13865736.html