【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】安装_第1张图片
添加phoenix-4.14.2-HBase-1.4-server.jar 到HBase各节点的lib目录下

【Phoenix】安装_第2张图片
重启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

【Phoenix】安装_第3张图片
选择需要的插件,安装

配置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.

【Phoenix】安装_第4张图片

【Phoenix】安装_第5张图片

【Phoenix】安装_第6张图片

你可能感兴趣的:(【Phoenix】安装)