Index of /dist/hbase/2.3.2https://archive.apache.org/dist/hbase/2.3.2/
该配置是单机版本,集群类似
- export JAVA_HOME=/data/soft/jdk1.8
- export HBASE_MANAGES_ZK=false
其中HBASE_MANAGES_ZK,如果使用内置的ZooKeeper,则用true,否则false
- <property>
- <name>hbase.rootdir</name>
- <value>hdfs://bigdata02:8020/hbase</value>
- </property>
- <property>
- <name>hbase.master.port</name>
- <value>16000</value>
- </property>
- <property>
- <name>hbase.cluster.distributed</name>
- <value>true</value>
- </property>
- <property>
- <name>hbase.zookeeper.quorum</name>
- <value>127.0.0.1:2181</value>
- </property>
- <property>
- <name>hbase.zookeeper.property.dataDir</name>
- <value>/data/soft/apache-zookeeper-3.5.8-bin/data</value>
- </property>
- ln -s /data/soft/hadoop-3.2.0/etc/hadoop/core-site.xml /data/soft/hbase-2.3.2/conf
-
- ln -s /data/soft/hadoop-3.2.0/etc/hadoop/hdfs-site.xml /data/soft/hbase-2.3.2/conf
create 'student','info'; 其中student是表名称,info是列族名
put 'student' ,'1002','info:name','libaowen'
put 'student' ,'1002','info:sex','male'
其中1002是行键(row key) info:name是列族名和列名 'libaowen' 是列的值
通过describe查看表的结构
describe 'student
put 'student' ,'1002','info:sex','sexmale'
get 'student' ,'1002'
count 'student' :获得表中数据的行数
delete 'student' ,'1002','info:sex'