HDFS 伪分布式部署
hbase
scp .\hbase-2.4.4-bin.tar.gz hadoop@hadoop102:/opt/software
cd /opt
tar -zxvf software/hbase-2.4.4-bin.tar.gz -C module/
sudo vim /etc/profile.d/my_env.sh
# hbase-2.4.4
export HBASE_HOME=/opt/module/hbase-2.4.4
export PATH=$PATH:$HBASE_HOME/bin
source /etc/profile
hbase version
cd /opt/module/hbase-2.4.4/lib/client-facing-thirdparty
mv ./slf4j-log4j12-1.7.30.jar ./slf4j-log4j12-1.7.30.jar.bak
cd /opt/module/hbase-2.4.4/conf/
vim hbase-site.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://hadoop102:9000/hbase</value>
</property>
<property>
<name>hbase.wal.provider</name>
<value>filesystem</value>
</property>
<property>
<name>hbase.zookeeper.property.datadir</name>
<value>/opt/module/hbase-2.4.4/data/zookeeper</value>
</property>
<!--文件中已有的配置-->
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>false</value>
</property>
<property>
<name>hbase.tmp.dir</name>
<value>./tmp</value>
</property>
</configuration>
start-all.sh
start-hbase.sh
http://hadoop102:16010/
version
status
whoami
list
create 'log','f1'
exists 'log'
desc 'log'
disable 'log'
alter 'log',{NAME=>'f1',TTL=>'2592000'}
enable 'log'
put 'log','rowkey001','f1:col1','value1'
put 'log','rowkey001','f1:col2','value2'
put 'log','rowkey002','f1:col1','value1'
get 'log','rowkey001', 'f1:col1'
get 'log','rowkey001', {COLUMN=>'f1:col1'}
scan 'log'
scan 'log',{LIMIT=>1}
count 'log', {INTERVAL => 10, CACHE => 200}
delete 'log','rowkey001','f1:col2'
deleteall 'log','rowkey002'
truncate 'log'