built from scratch, in which case the HBase table and column families will be created automatically.The table metadata is stored in an HBase table and versioned, such that snapshot queries over prior versions will automatically use the correct schema.Ī Phoenix table is created through the CREATE TABLE command and can either be: If auto commit is turned on for a connection, then Phoenix will, whenever possible, execute the entire DML command through a coprocessor on the server-side, so performance will improve.Īpache Phoenix supports table creation and versioned incremental alterations through DDL commands. The changes are sent to the server when the transaction is committed and discarded when the transaction is rolled back. The DML commands of Apache Phoenix, UPSERT VALUES, UPSERT SELECT and DELETE, batch pending changes to HBase tables on the client side. In addition, non transactional tables will not see their updates until after a commit has occurred. Non transactional tables have no guarantees above and beyond the HBase guarantee of row level atomicity (see here). A transaction is started implicitly when a transactional table is referenced in a statement, at which point you will not see updates from other connections until either a commit or rollback occurs. The later commit would produce an exception indicating that a conflict was detected. An optimistic concurrency model is used to detect row level conflicts with first commit wins semantics. In addition, transactional tables will see their own uncommitted data when querying. Both cross table and cross row transactions are supported. Commits over transactional tables will have an all-or-none behavior - either all data will be committed (including any updates to secondary indexes) or none of it will (and an exception will be thrown). Once enabled, a table may optionally be declared as transactional (see here for directions). In this case, you’ll also need to run the transaction manager that’s included in the distribution.
#ORDER OF THE PHOENIX PDF GOOGLE DOCS FULL#
To enable full ACID transactions, a beta feature available in the 4.7.0 release, set the property to true.