赞
踩
需要安装java
wget https://dlcdn.apache.org/hbase/2.5.7/hbase-2.5.7-bin.tar.gz
tar -zxvf hbase-2.5.7-bin.tar.gz
export HBASE_HOME=/path/to/hbase-2.5.7
export PATH=$PATH:$HBASE_HOME/bin
cd hbase-2.5.7/bin
./start-hbase.sh
cd hbase-2.5.7/bin
./stop-hbase.sh
hbase shell
一旦进入 HBase Shell,可以执行各种查询和修改操作。以下是一些基本的查询和修改命令示例:
create 'my_table', 'column_family'
put 'my_table', 'row1', 'column_family:column1', 'value1'
get 'my_table', 'row1'
scan 'my_table'
delete 'my_table', 'row1', 'column_family:column1'
disable 'my_table'
drop 'my_table'
hbase-site.xml
,位于hbase-2.5.7/conf
下,配置如下<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <configuration> <property> <name>hbase.zookeeper.quorum</name> <value>aaa.bbb.ccc.com:12345</value> </property> <property> <name>hbase.client.username</name> <value>admin</value> </property> <property> <name>hbase.client.password</name> <value>admin</value> </property> </configuration>
hbase shell
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。