HBase安装配置

①下载压缩包(选择与自己安装的Hadoop版本的兼容版本,见后面附录)

官网下载地址:https://mirrors.tuna.tsinghua.edu.cn/apache/hbase/stable/

选择稳定版hbase-1.4.9-bin.tar.gz,在Windows里面下载。

②将压缩包从Windows传输到Linux当前目录下

SecureCRT 【File】→【Connect SFTP Session】开启sftp操作

③安装

解压安装到指定目录下/opt/module(/opt是系统自带目录,之下的/module是自己创建的)

④配置环境变量

在/etc/profile文件里添加HBase安装路径的配置信息,之后用source命令使配置生效。安装之后的目录为hbase-1.4.9,修改为hbase,所以我的HBase安装路径是/opt/module/hbase。

测试HBase安装成功,命令hbase version,或hbase。

HBase配置(伪分布式模式)

配置文件位于HBase安装路径的conf目录(/opt/module/hbase/conf)下面

①配置hbase-env.sh

设置Java安装路径

设置HBase的配置文件路径(/opt/module/hbase/conf)

采用HBase自带Zookeeper,设置参数true

②配置hbase-site.xml

hbase.rootdir

hdfs://bigdata128:9000/hbase

    <name>hbase.cluster.distributed</name>

    <value>true</value>

hbase.zookeeper.quorum

localhost

③启动并运行HBase(之前启动Hadoop)

启动HBase,并jps查看

用完停止HBase运行(之后停止Hadoop)

进入HBase数据库

进入HBase的shell命令行模式

了解命令使用方法,如创建表,输入help ‘create’

①创建表

②添加数据

③查看数据

④删除数据

删除一个单元格

删除一行

⑤删除表

HBase架构原理

https://www.cnblogs.com/steven-note/p/7209398.html

Hbase Java API

https://www.cnblogs.com/liuwei6/p/6842536.html

https://www.cnblogs.com/tiantianbyconan/p/3557571.html

参考资料:

Linux下配置环境变量最常用的两种方法—— .bashrc 和 /etc/profile

https://blog.csdn.net/sun8112133/article/details/79901527

学习 HBase,应该选择哪个版本?

https://blog.csdn.net/tzhuwb/article/details/81153323

https://www.csdn.net/gather_2a/MtTaEgzsODU5Mi1ibG9n.html

WARN
[main] zookeeper.ZooKeeperNodeTracker: Can’t get or delete the master
znode

Will not attempt to authenticate using SASL
(unknown error)

建表之后查看logs报错

ERROR [main]
client.ConnectionManager$HConnectionImplementation: Can’t get connection to
ZooKeeper: KeeperErrorCode = ConnectionLoss for /hbase

建表时报错

Can’t get connection to ZooKeeper:
KeeperErrorCode = ConnectionLoss for /hbase

重新停止、启动HBASE,查看logs,报错2019-04-04 10:41:52,238 INFO
[M:0;bigdata128:35321-SendThread(localhost:2181)] zookeeper.ClientCnxn:
Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt
to authenticate using SASL (unknown error)

Hbase shell 运行status

报错2019-04-04 10:49:55,710 ERROR [main]
client.ConnectionManager$HConnectionImplementation: Can’t get connection to
ZooKeeper: KeeperErrorCode = ConnectionLoss for /hbase

启动hbase,报错:

ERROR [main] server.ZooKeeperServer:
ZKShutdownHandler is not registered

ERROR [main] master.HMasterCommandLine:
Master exiting

java.io.IOException: Could not start ZK at
requested port of 2181. ZK was started
at port: 2182. Aborting as clients (e.g.
shell) will not be able to find this ZK qu

①下载压缩包(选择与自己安装的Hadoop版本的兼容版本,见后面附录)

官网下载地址:https://mirrors.tuna.tsinghua.edu.cn/apache/hbase/stable/

选择稳定版hbase-1.4.9-bin.tar.gz,在Windows里面下载。

②将压缩包从Windows传输到Linux当前目录下

SecureCRT 【File】→【Connect SFTP Session】开启sftp操作

③安装

解压安装到指定目录下/opt/module(/opt是系统自带目录,之下的/module是自己创建的)

④配置环境变量

在/etc/profile文件里添加HBase安装路径的配置信息,之后用source命令使配置生效。安装之后的目录为hbase-1.4.9,修改为hbase,所以我的HBase安装路径是/opt/module/hbase。

测试HBase安装成功,命令hbase version,或hbase。

HBase配置(伪分布式模式)

配置文件位于HBase安装路径的conf目录(/opt/module/hbase/conf)下面

①配置hbase-env.sh

设置Java安装路径

设置HBase的配置文件路径(/opt/module/hbase/conf)

采用HBase自带Zookeeper,设置参数true

②配置hbase-site.xml

hbase.rootdir

hdfs://bigdata128:9000/hbase

hbase.cluster.distributed

true

hbase.zookeeper.quorum

localhost

③启动并运行HBase(之前启动Hadoop)

启动HBase,并jps查看

用完停止HBase运行(之后停止Hadoop)

进入HBase数据库

进入HBase的shell命令行模式

了解命令使用方法,如创建表,输入help ‘create’

①创建表

②添加数据

③查看数据

④删除数据

删除一个单元格

删除一行

⑤删除表

HBase架构原理

https://www.cnblogs.com/steven-note/p/7209398.html

Hbase Java API

https://www.cnblogs.com/liuwei6/p/6842536.html

https://www.cnblogs.com/tiantianbyconan/p/3557571.html

参考资料:

Linux下配置环境变量最常用的两种方法—— .bashrc 和 /etc/profile

https://blog.csdn.net/sun8112133/article/details/79901527

学习 HBase,应该选择哪个版本?

https://blog.csdn.net/tzhuwb/article/details/81153323

https://www.csdn.net/gather_2a/MtTaEgzsODU5Mi1ibG9n.html

WARN 
[main] zookeeper.ZooKeeperNodeTracker: Can’t get or delete the master
znode

Will not attempt to authenticate using SASL
(unknown error)

建表之后查看logs报错

ERROR [main]
client.ConnectionManager$HConnectionImplementation: Can’t get connection to
ZooKeeper: KeeperErrorCode = ConnectionLoss for /hbase

建表时报错

Can’t get connection to ZooKeeper:
KeeperErrorCode = ConnectionLoss for /hbase

重新停止、启动HBASE,查看logs,报错2019-04-04 10:41:52,238 INFO 
[M:0;bigdata128:35321-SendThread(localhost:2181)] zookeeper.ClientCnxn:
Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt
to authenticate using SASL (unknown error)

Hbase shell 运行status

报错2019-04-04 10:49:55,710 ERROR [main]
client.ConnectionManager$HConnectionImplementation: Can’t get connection to
ZooKeeper: KeeperErrorCode = ConnectionLoss for /hbase

启动hbase,报错:

ERROR [main] server.ZooKeeperServer:
ZKShutdownHandler is not registered

ERROR [main] master.HMasterCommandLine:
Master exiting

java.io.IOException: Could not start ZK at
requested port of 2181.  ZK was started
at port: 2182.  Aborting as clients (e.g.
shell) will not be able to find this ZK quorum.

关闭防火墙service iptables stop

orum.

关闭防火墙service iptables stop

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值