【Introduction to 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 is ​​the SQL driver for HBase. Phoenix makes HBase support access via JDBC and converts your SQL queries into HBase scans and corresponding actions.

compatibility:

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, a project open sourced by saleforce.com and later donated to Apache. It is equivalent to a Java middleware that helps developers, such as using jdbc to access relational databases, access NoSql database HBase.

 

Implementation principle:

The Phoenix query engine converts the SQL query into one or more HBase scans and orchestrates the execution to generate standard JDBC result sets. Using the HBase API, coprocessors, and custom filters directly, the performance is on the order of milliseconds for simple queries and seconds for millions of rows.

 

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.

 

 

Some of the most noteworthy features of Phoenix are:

Embedded JDBC driver that implements most of the java.sql interfaces, including the metadata API

Columns can be modeled by multiple row keys or key/value cells

Full query support with multiple predicates and optimized scan keys

DDL support: add/drop columns via CREATE TABLE, DROP TABLE and ALTER TABLE

Versioned schema repository: snapshot queries use the appropriate schema when writing data

DML support: UPSERT VALUES for row-by-row insert, UPSERT SELECT for bulk data transfer between the same or different tables, DELETE for row deletion

Limited transaction support via client-side batching

Single table - not yet joined, and secondary indexes are also under development

Keep up with the ANSI SQL standard

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326621175&siteId=291194637