hbase安装测试
//---------------------------------------------------------------
cd /home/hadoop/
tar -zxvf hbase-1.2.5-bin.tar.gz -C /home/hadoop/
使用sudo vi /etc/profile命令修改系统环境变量
export HBASE_HOME=/home/hadoop/hbase-1.2.5
export PATH=$PATH:$HBASE_HOME/bin
使环境变量生效并验证环境变量生效
source /etc/profile
查看版本信息
hbase version
hadoop fs -mkdir /HbaseDir
hbase-sizte.xml
或者如下:
hbase-env.cmd
/bin/start-hbase.sh
http://192.168.162.128:16010
http://ubuntuHadoop:16010
http://localhost:16010
测试:
hbase shell
创建表
create 'test','cf'
查询表
list
插入数据
put 'test', 'row1', 'cf:a', 'value1'
put 'test', 'row2', 'cf:b', 'value2'
put 'test', 'row3', 'cf:c', 'value3'
查询表数据
scan 'test'
get 'test', 'row1'
退出hbase shell 输入命令exit
关闭hbase 运行脚本stop-hbase.sh
[url]https://jingyan.baidu.com/article/295430f1c23c940c7e0050ed.html[/url]
[url]https://blog.youkuaiyun.com/jack_eusong/article/details/78686446[/url]
//---------------------------------------------------------------
cd /home/hadoop/
tar -zxvf hbase-1.2.5-bin.tar.gz -C /home/hadoop/
使用sudo vi /etc/profile命令修改系统环境变量
export HBASE_HOME=/home/hadoop/hbase-1.2.5
export PATH=$PATH:$HBASE_HOME/bin
使环境变量生效并验证环境变量生效
source /etc/profile
查看版本信息
hbase version
hadoop fs -mkdir /HbaseDir
hbase-sizte.xml
<configuration>
<!--/**配置hbase的根目录*/-->
<property>
<name>hbase.rootdir</name>
<value>hdfs://ubuntuHadoop:9000/HbaseDir</value>
</property>
<!--将zookeeper产生的文件保存到指定文件夹下-->
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/hadoop/zookeeperDir</value>
</property>
</configuration>
或者如下:
<configuration>
<!--/**配置hbase的根目录(也是hdfs目录(会自动新建))*/-->
<property>
<name>hbase.rootdir</name>
<value>/home/hadoop/baseDir</value>
</property>
<!--将zookeeper产生的文件保存到指定文件夹下-->
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/hadoop/zookeeperDir</value>
</property>
</configuration>
hbase-env.cmd
export JAVA_HOME=/home/jdk/java/jdk1.8.0_181
#使用HBASE自带的zookeeper管理集群
export HBASE_MANAGES_ZK=true
/bin/start-hbase.sh
http://192.168.162.128:16010
http://ubuntuHadoop:16010
http://localhost:16010
测试:
hbase shell
创建表
create 'test','cf'
查询表
list
插入数据
put 'test', 'row1', 'cf:a', 'value1'
put 'test', 'row2', 'cf:b', 'value2'
put 'test', 'row3', 'cf:c', 'value3'
查询表数据
scan 'test'
get 'test', 'row1'
退出hbase shell 输入命令exit
关闭hbase 运行脚本stop-hbase.sh
[url]https://jingyan.baidu.com/article/295430f1c23c940c7e0050ed.html[/url]
[url]https://blog.youkuaiyun.com/jack_eusong/article/details/78686446[/url]