【Apache Phoenix 介绍】

Apache Phoenix enables OLTP and operational analytics in Hadoop for low latency applications by combining the best of both worlds:

the power of standard SQL and JDBC APIs with full ACID transaction capabilities and

the flexibility of late-bound, schema-on-read capabilities from the NoSQL world by leveraging HBase as its backing store

Apache Phoenix is fully integrated with other Hadoop products such as Spark, Hive, Pig, Flume, and Map Reduce.

Apache Phoenix 是 HBase 的 SQL 驱动。Phoenix 使得 HBase 支持通过 JDBC 的方式进行访问,并将你的 SQL 查询转成 HBase 的扫描和相应的动作。

兼容性:

Phoenix 2.x - HBase 0.94.x

Phoenix 3.x - HBase 0.94.x

Phoenix 4.x - HBase 0.98.1+

Apache Phoenix is an open source, massively parallel, relational database engine supporting OLTP for Hadoop using Apache HBase as its backing store. Phoenix provides a JDBC driver that hides the intricacies of the noSQL store enabling users to create, delete, and alter SQL tables, views, indexes, and sequences; insert and delete rows singly and in bulk; and query data through SQL. Phoenix compiles queries and other statements into native noSQL store APIs rather than using MapReduce enabling the building of low latency applications on top of noSQL stores



 

phoenix,由saleforce.com开源的一个项目,后又捐给了Apache。它相当于一个Java中间件,帮助开发者,像使用jdbc访问关系型数据库一些,访问NoSql数据库HBase。

实现原理:

Phoenix查询引擎会将SQL查询转换为一个或多个HBase scan,并编排执行以生成标准的JDBC结果集。直接使用HBase API、协同处理器与自定义过滤器,对于简单查询来说,其性能量级是毫秒,对于百万级别的行数来说,其性能量级是秒。

SQL Support

Apache Phoenix takes your SQL query, compiles it into a series of HBase scans, and orchestrates the running of those scans to produce regular JDBC result sets. Direct use of the HBase API, along with coprocessors and custom filters, results in performance on the order of milliseconds for small queries, or seconds for tens of millions of rows.

To see a complete list of what is supported, go to our language reference. All standard SQL query constructs are supported, including SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY, etc. It also supports a full set of DML commands as well as table creation and versioned incremental alterations through our DDL commands.

Here’s a list of what is currently not supported:

Relational operators. Intersect, Minus.

Miscellaneous built-in functions. These are easy to add - read this blog for step by step instructions.

Phoenix最值得关注的一些特性有:

嵌入式的JDBC驱动,实现了大部分的java.sql接口,包括元数据API

可以通过多部行键或是键/值单元对列进行建模

完善的查询支持,可以使用多个谓词以及优化的扫描键

DDL支持:通过CREATE TABLE、DROP TABLE及ALTER TABLE来添加/删除列

版本化的模式仓库:当写入数据时,快照查询会使用恰当的模式

DML支持:用于逐行插入的UPSERT VALUES、用于相同或不同表之间大量数据传输的UPSERT SELECT、用于删除行的DELETE

通过客户端的批处理实现的有限的事务支持

单表——还没有连接,同时二级索引也在开发当中

紧跟ANSI SQL标准

猜你喜欢

转载自gaojingsong.iteye.com/blog/2360379