Phoenix Tips (2)基础

1、Phoenix 主要技术点

a、将SQL转化为HBase Scan,将结果封装为JDBC Result Set。

b、表的元数据保存在HBase表(系统表)中。

c、使用了coprocessor 和 custom filter 保证高效,使得小规模查询的延时在毫秒级,百万行的查询延时在秒级。

  • coprocessors to perform operations on the server-side thus minimizing client/server data transfer
  • custom filters to prune data as close to the source as possible In addition, to minimize any startup costs, Phoenix uses native HBase APIs rather than going through the map/reduce framework

2、JDBC连接的URL

jdbc:phoenix [ :<zookeeper quorum> [ :<port number> ] [ :<root node> ] ]

如:

    Connection conn = DriverManager.getConnection("jdbc:phoenix:server1,server2:2181");
属性对应于:hbase.zookeeper.quorum, hbase.zookeeper.property.clientPort, zookeeper.znode.parent 

3、Phoenix 不支持特性

a、Full Transaction, 现在只支持 TRANSACTION_READ_COMMITTED,不支持其他类型。

b、关系操作. Union, Intersect, Minus

c、杂项内置函数


4、 映射到已存在HBase表

 使用 CREATE TABLE and CREATE VIEW 

区别:

a、CREATE TABLE 启用  KEEP_DELETED_CELLS = true,  CREATE VIEW 不会

b、CREATE TABLE 能添加HBase 中不存在的列族,CREATE VIEW 不会



原文地址:https://www.cnblogs.com/leeeee/p/7276380.html