【Phoenix】安装

Phoenix is an open source SQL skin for HBase. You use the standard
JDBC APIs instead of the regular HBase client APIs to create tables,
insert data, and query your HBase data.

下载解压安装

下载对应版本的phoenix

解压后进入phoenix目录查看
在这里插入图片描述
添加phoenix-4.14.2-HBase-1.4-server.jar 到HBase各节点的lib目录下

在这里插入图片描述
重启HBase后启动phoenix

root@master:/opt/modules/phonix-4.14.2-HBase-1.4/bin# ./sqlline.py master,slave01,slave02,slave03,slave04,slave05,slave06:2181  

查看自动生成的系统表
在这里插入图片描述

安装SQuirrel客户端

SQuirreL SQL客户端是一个图形化的Java程序,它允许您查看JDBC兼容数据库的结构、浏览表中的数据、发出SQL命令等等。

下载SQuirrel

SQuirreL 客户端是基于java安装,基于这个前提当前操作系统需要安装java环境。

cmd进入下载的jar包存放目录。执行以下命令

  java -jar squirrel-sql-3.9.1-standard.jar

在这里插入图片描述
选择需要的插件,安装

配置SQuirrel

按照官方方法来做

Remove prior phoenix-[oldversion]-client.jar from the lib directory of
SQuirrel, copy phoenix-[newversion]-client.jar to the lib directory
(newversion should be compatible with the version of the phoenix
server jar used with your HBase installation) Start SQuirrel and add
new driver to SQuirrel (Drivers -> New Driver) In Add Driver dialog
box, set Name to Phoenix, and set the Example URL to
jdbc:phoenix:localhost. Type “org.apache.phoenix.jdbc.PhoenixDriver”
into the Class Name textbox and click OK to close this dialog. Switch
to Alias tab and create the new Alias (Aliases -> New Aliases) In the
dialog box, Name: any name, Driver: Phoenix, User Name: anything,
Password: anything Construct URL as follows: jdbc:phoenix: zookeeper
quorum server. For example, to connect to a local HBase use:
jdbc:phoenix:localhost Press Test (which should succeed if everything
is setup correctly) and press OK to close. Now double click on your
newly created Phoenix alias and click Connect. Now you are ready to
run SQL queries against Phoenix.

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值