Author: tdsilva
Date: Wed Feb  3 04:40:49 2016
New Revision: 1728256

URL: http://svn.apache.org/viewvc?rev=1728256&view=rev
Log:
Transaction documentation addendum

Modified:
    phoenix/site/publish/index.html
    phoenix/site/publish/news.html
    phoenix/site/publish/recent.html
    phoenix/site/publish/transactions.html
    phoenix/site/source/src/site/markdown/index.md
    phoenix/site/source/src/site/markdown/news.md
    phoenix/site/source/src/site/markdown/recent.md
    phoenix/site/source/src/site/markdown/transactions.md

Modified: phoenix/site/publish/index.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/index.html?rev=1728256&r1=1728255&r2=1728256&view=diff
==============================================================================
--- phoenix/site/publish/index.html (original)
+++ phoenix/site/publish/index.html Wed Feb  3 04:40:49 2016
@@ -176,7 +176,7 @@
      </tr> 
     </tbody> 
    </table> 
-   <p><span id="alerts" style="background-color:#ffc; text-align: 
center;display: block;padding:10px; border-bottom: solid 1px #cc9"> <b><a 
href="news.html">News</a>:</b> Recently added: <a class="externalLink" 
href="https://blogs.apache.org/phoenix/entry/announcing_phoenix_4_5_released";>Announcing
 Apache Phoenix 4.5 released</a> (July 29, 2015) &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a class="externalLink" 
href="https://twitter.com/ApachePhoenix";><img src="images/follow.png" 
title="Follow Apache Phoenix on Twitter" alt="" /></a></span></p> 
+   <p><span id="alerts" style="background-color:#ffc; text-align: 
center;display: block;padding:10px; border-bottom: solid 1px #cc9"> <b><a 
href="news.html">News</a>:</b> Recently added: <a class="externalLink" 
href="http://phoenix.apache.org/transactions.html";>News: Announcing transaction 
support in 4.7.0 release</a> (Feb 3, 2016) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a class="externalLink" 
href="https://twitter.com/ApachePhoenix";><img src="images/follow.png" 
title="Follow Apache Phoenix on Twitter" alt="" /></a></span></p> 
    <hr /> 
   </div> 
  </div> 
@@ -215,6 +215,18 @@
  </ul> 
 </div> 
 <div class="section"> 
+ <h2 id="transactions">Transactions<a name="Transactions"></a></h2> 
+ <p>To enable full ACID transactions, a beta feature available in the 4.7.0 
release, set the <tt>phoenix.transactions.enabled</tt> property to true. In 
this case, you’ll also need to run the transaction manager that’s included 
in the distribution. Once enabled, a table may optionally be declared as 
transactional (see <a href="transactions.html">here</a> for directions). 
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). Both cross table and cross row 
transactions are supported. In addition, transactional tables will see their 
own uncommitted data when querying. An optimistic concurrency model is used to 
detect row level conflicts with first commit wins semantics. The later commit 
would produce an exception indicating that a conflict was detected. A 
transaction is started implicitly when a transactional table is referenced i
 n a statement, at which point you will not see updates from other connections 
until either a commit or rollback occurs.</p> 
+ <p>Non transactional tables have no guarantees above and beyond the HBase 
guarantee of row level atomicity (see <a class="externalLink" 
href="https://hbase.apache.org/acid-semantics.html";>here</a>). In addition, non 
transactional tables will not see their updates until after a commit has 
occurred. The DML commands of Apache Phoenix, UPSERT VALUES, UPSERT SELECT and 
DELETE, batch pending changes to HBase tables on the client side. The changes 
are sent to the server when the transaction is committed and discarded when the 
transaction is rolled back. 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.</p> 
+ <div class="section"> 
+  <div class="section"> 
+   <h4 id="Timestamps">Timestamps</h4> 
+   <p>Most commonly, an application will let HBase manage timestamps. However, 
under some circumstances, an application needs to control the timestamps 
itself. In this case, a long-valued “CurrentSCN” property may be specified 
at connection time to control timestamps for any DDL, DML, or query. This 
capability may be used to run snapshot queries against prior row values, since 
Phoenix uses the value of this connection property as the max timestamp of 
scans.</p> 
+   <p>Timestamps may not be controlled for transactional tables. Instead, the 
transaction manager assigns timestamps which become the HBase cell timestamps 
after a commit. Timestamps still correspond to wall clock time, however they 
are multiplied by 1,000,000 to ensure enough granularity for uniqueness across 
the cluster.</p> 
+  </div> 
+ </div> 
+</div> 
+<div class="section"> 
  <h2 id="schema">Schema<a name="Schema"></a></h2> 
  <p>Apache Phoenix supports table creation and versioned incremental 
alterations through DDL commands. The table metadata is stored in an HBase 
table.</p> 
  <p>A Phoenix table is created through the <a 
href="language/index.html#create">CREATE TABLE</a> DDL command and can either 
be:</p> 
@@ -249,13 +261,6 @@
  </div> 
 </div> 
 <div class="section"> 
- <h2 id="transactions">Transactions<a name="Transactions"></a></h2> 
- <p>The DML commands of Apache Phoenix, <a 
href="language/index.html#upsert_values">UPSERT VALUES</a>, <a 
href="language/index.html#upsert_select">UPSERT SELECT</a> and <a 
href="language/index.html#delete">DELETE</a>, batch pending changes to HBase 
tables on the client side. The changes are sent to the server when the 
transaction is committed and discarded when the transaction is rolled back. 
</p> 
- <p>If the “phoenix.transactions.enabled” property is enabled then the 
transaction isolation level is TRANSACTION_SERIALIZABLE which allows a 
transaction to see its own uncommitted data. Otherwise the transaction 
isolation level is TRANSACTION_READ_COMMITTED which means a client cannot see 
its own uncommitted data. </p> 
- <p>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.</p> 
- <p>Most commonly, an application will let HBase manage timestamps. However, 
under some circumstances, an application needs to control the timestamps 
itself. In this case, a long-valued “CurrentSCN” property may be specified 
at connection time to control timestamps for any DDL, DML, or query. This 
capability may be used to run snapshot queries against prior row values, since 
Phoenix uses the value of this connection property as the max timestamp of 
scans. However the SCN feature is not supported with transactions. </p> 
-</div> 
-<div class="section"> 
  <h2 id="Metadata">Metadata</h2> 
  <p>The catalog of tables, their columns, primary keys, and types may be 
retrieved via the java.sql metadata interfaces: <tt>DatabaseMetaData</tt>, 
<tt>ParameterMetaData</tt>, and <tt>ResultSetMetaData</tt>. For retrieving 
schemas, tables, and columns through the DatabaseMetaData interface, the schema 
pattern, table pattern, and column pattern are specified as in a LIKE 
expression (i.e. % and _ are wildcards escaped through the character). The 
table catalog argument to the metadata APIs deviates from a more standard 
relational database model, and instead is used to specify a column family name 
(in particular to see all columns in a given column family).</p> 
 </div>

Modified: phoenix/site/publish/news.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/news.html?rev=1728256&r1=1728255&r2=1728256&view=diff
==============================================================================
--- phoenix/site/publish/news.html (original)
+++ phoenix/site/publish/news.html Wed Feb  3 04:40:49 2016
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2016-01-23
+ Generated by Apache Maven Doxia at 2016-02-02
  Rendered using Reflow Maven Skin 1.1.0 
(http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -150,6 +150,16 @@
 <div class="section"> 
  <div class="section"> 
   <div class="section"> 
+   <h4 id="Announcing_transaction_support_in_4.7.0_release_Feb_3_2016"><a 
class="externalLink" 
href="http://phoenix.apache.org/transactions.html";>Announcing transaction 
support in 4.7.0 release</a> (Feb 3, 2016)</h4> 
+   <hr /> 
+   <hr /> 
+  </div> 
+  <div class="section"> 
+   <h4 
id="Announcing_time_series_optimization_in_Phoenix_4.6_released_Oct_23_2015"><a 
class="externalLink" 
href="https://blogs.apache.org/phoenix/entry/new_optimization_for_time_series";>Announcing
 time series optimization in Phoenix 4.6 released</a> (Oct 23, 2015)</h4> 
+   <hr /> 
+   <hr /> 
+  </div> 
+  <div class="section"> 
    <h4 id="Announcing_Phoenix_4.5_released_July_29_2015"><a 
class="externalLink" 
href="https://blogs.apache.org/phoenix/entry/announcing_phoenix_4_5_released";>Announcing
 Phoenix 4.5 released</a> (July 29, 2015)</h4> 
    <hr /> 
   </div> 

Modified: phoenix/site/publish/recent.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/recent.html?rev=1728256&r1=1728255&r2=1728256&view=diff
==============================================================================
--- phoenix/site/publish/recent.html (original)
+++ phoenix/site/publish/recent.html Wed Feb  3 04:40:49 2016
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2016-01-23
+ Generated by Apache Maven Doxia at 2016-02-02
  Rendered using Reflow Maven Skin 1.1.0 
(http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -146,6 +146,7 @@
 </div> 
 <p>As items are implemented from our road map, they are moved here to track 
the progress we’ve made:</p> 
 <ol style="list-style-type: decimal"> 
+ <li><b><a class="externalLink" 
href="https://issues.apache.org/jira/browse/PHOENIX-1674";>Transaction 
Support</a></b>. Supports transactions by integrating with <a 
class="externalLink" href="https://github.com/continuuity/tephra";>Tephra</a>. 
<b>Available in our 4.7 release</b></li> 
  <li><b><a 
href="secondary_indexing.html#Asynchronous_Index_Population">Asynchronous Index 
Population</a></b>. Enables an index to be created asynchronously using a map 
reduce job. <b>Available in our 4.5 release</b></li> 
  <li><b><a href="udf.html">User Defined Functions</a></b>. Allows users to 
create and deploy their own custom or domain-specific user-defined functions to 
the cluster. <b>Available in our 4.4 release</b></li> 
  <li><b><a href="secondary_indexing.html#Functional_Indexes">Functional 
Indexes</a></b>. Enables an index to be defined as expressions as opposed to 
just column names and have the index be used when a query contains this 
expression. <b>Available in our 4.3 release</b></li> 

Modified: phoenix/site/publish/transactions.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/transactions.html?rev=1728256&r1=1728255&r2=1728256&view=diff
==============================================================================
--- phoenix/site/publish/transactions.html (original)
+++ phoenix/site/publish/transactions.html Wed Feb  3 04:40:49 2016
@@ -232,7 +232,8 @@ DELETE FROM my_other_table WHERE k=2;
  <ol style="list-style-type: decimal"> 
   <li>Starting a transaction on a connection with an SCN set is not 
allowed.</li> 
   <li>Setting the maximum number of versions property while creating a 
transactional table limits the number of snapshots available for concurrent 
transactions.</li> 
-  <li>When a transaction times out or if it cannot be rolled back by the 
client, it is added to an invalid list. This list will can potentially grow if 
there are a lot of failed or timed out transactions. For now, now an 
adminstrator can manually clear transactions from this list. <a 
class="externalLink" 
href="https://issues.cask.co/browse/TEPHRA-35";>TEPHRA-35</a> describes ongoing 
work to automatically remove transactions from the invalid list once all data 
associated with the transaction has been removed.</li> 
+  <li>When a transaction times out or if it cannot be rolled back by the 
client, it is added to an invalid list. This list can potentially grow if there 
are a lot of failed or timed out transactions. For now, an adminstrator can 
manually clear transactions from this list after a major compaction has 
occurred. <a class="externalLink" 
href="https://issues.cask.co/browse/TEPHRA-35";>TEPHRA-35</a> describes ongoing 
work to automatically remove transactions from the invalid list once all data 
associated with the transaction has been removed.</li> 
+  <li>If adding an index asynchronously to an existing transactional table, 
make sure to run a major compaction before issuing the CREATE INDEX ASYNC 
command as otherwise invalid and/or uncommitted transactions may appear in your 
index <a class="externalLink" 
href="https://issues.apache.org/jira/browse/PHOENIX-2154";>PHOENIX-2154</a>.</li>
 
  </ol> 
 </div>
                        </div>

Modified: phoenix/site/source/src/site/markdown/index.md
URL: 
http://svn.apache.org/viewvc/phoenix/site/source/src/site/markdown/index.md?rev=1728256&r1=1728255&r2=1728256&view=diff
==============================================================================
--- phoenix/site/source/src/site/markdown/index.md (original)
+++ phoenix/site/source/src/site/markdown/index.md Wed Feb  3 04:40:49 2016
@@ -45,7 +45,7 @@
 
 <span id="alerts" style="background-color:#ffc; text-align: center;display: 
block;padding:10px; border-bottom: solid 1px #cc9">
 <strong><a href="news.html">News</a>:</strong>
-Recently added: <a 
href="https://blogs.apache.org/phoenix/entry/announcing_phoenix_4_5_released";>Announcing
 Apache Phoenix 4.5 released</a> (July 29, 2015)
+Recently added: <a href="http://phoenix.apache.org/transactions.html";>News: 
Announcing transaction support in 4.7.0 release</a> (Feb 3, 2016)
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; 
 <a href='https://twitter.com/ApachePhoenix'><img title="Follow Apache Phoenix 
on Twitter" src="images/follow.png"/></a></span>
 
@@ -81,6 +81,16 @@ Here's a list of what is currently **not
 * **Relational operators**. Union, Intersect, Minus.
 * **Miscellaneous built-in functions**. These are easy to add - read this 
[blog](http://phoenix-hbase.blogspot.com/2013/04/how-to-add-your-own-built-in-function.html)
 for step by step instructions.
 
+##<a id="transactions"></a>Transactions##
+To enable full ACID transactions, a beta feature available in the 4.7.0 
release, set the <code>phoenix.transactions.enabled</code> property to true. In 
this case, you'll also need to run the transaction manager that's included in 
the distribution. Once enabled, a table may optionally be declared as 
transactional (see [here](transactions.html) for directions). 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). Both cross table and cross row transactions 
are supported. In addition, transactional tables will see their own uncommitted 
data when querying. An optimistic concurrency model is used to detect row level 
conflicts with first commit wins semantics. The later commit would produce an 
exception indicating that a conflict was detected. A transaction is started 
implicitly when a transactional table is referenced in a statement, at whi
 ch point you will not see updates from other connections until either a commit 
or rollback occurs.
+
+Non transactional tables have no guarantees above and beyond the HBase 
guarantee of row level atomicity (see 
[here](https://hbase.apache.org/acid-semantics.html)). In addition, non 
transactional tables will not see their updates until after a commit has 
occurred. The DML commands of Apache Phoenix, UPSERT VALUES, UPSERT SELECT and 
DELETE, batch pending changes to HBase tables on the client side. The changes 
are sent to the server when the transaction is committed and discarded when the 
transaction is rolled back. 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.
+
+####Timestamps
+Most commonly, an application will let HBase manage timestamps. However, under 
some circumstances, an application needs to control the timestamps itself. In 
this case, a long-valued “CurrentSCN” property may be specified at 
connection time to control timestamps for any DDL, DML, or query. This 
capability may be used to run snapshot queries against prior row values, since 
Phoenix uses the value of this connection property as the max timestamp of 
scans.
+
+Timestamps may not be controlled for transactional tables. Instead, the 
transaction manager assigns timestamps which become the HBase cell timestamps 
after a commit. Timestamps still correspond to wall clock time, however they 
are multiplied by 1,000,000 to ensure enough granularity for uniqueness across 
the cluster.
+
 ##<a id="schema"></a>Schema
 
 Apache Phoenix supports table creation and versioned incremental alterations 
through DDL commands. The table metadata is stored in an HBase table.
@@ -110,15 +120,5 @@ The other caveat is that the way the byt
 
 Our composite row keys are formed by simply concatenating the values together, 
with a zero byte character used as a separator after a variable length type. 
For more information on our type system, see the [Data 
Type](language/datatypes.html).
 
-##<a id="transactions"></a>Transactions##
-The DML commands of Apache Phoenix, [UPSERT 
VALUES](language/index.html#upsert_values), [UPSERT 
SELECT](language/index.html#upsert_select) and 
[DELETE](language/index.html#delete), batch pending changes to HBase tables on 
the client side. The changes are sent to the server when the transaction is 
committed and discarded when the transaction is rolled back. 
-
-If the "phoenix.transactions.enabled" property is enabled then the transaction 
isolation level is TRANSACTION_SERIALIZABLE which allows a transaction to see 
its own uncommitted data.
-Otherwise the  transaction isolation level is TRANSACTION_READ_COMMITTED which 
means a client cannot see its own uncommitted data. 
-
-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.
-
-Most commonly, an application will let HBase manage timestamps. However, under 
some circumstances, an application needs to control the timestamps itself. In 
this case, a long-valued "CurrentSCN" property may be specified at connection 
time to control timestamps for any DDL, DML, or query. This capability may be 
used to run snapshot queries against prior row values, since Phoenix uses the 
value of this connection property as the max timestamp of scans. However the 
SCN feature is not supported with transactions. 
-
 ## Metadata ##
 The catalog of tables, their columns, primary keys, and types may be retrieved 
via the java.sql metadata interfaces: `DatabaseMetaData`, `ParameterMetaData`, 
and `ResultSetMetaData`. For retrieving schemas, tables, and columns through 
the DatabaseMetaData interface, the schema pattern, table pattern, and column 
pattern are specified as in a LIKE expression (i.e. % and _ are wildcards 
escaped through the \ character). The table catalog argument to the metadata 
APIs deviates from a more standard relational database model, and instead is 
used to specify a column family name (in particular to see all columns in a 
given column family).

Modified: phoenix/site/source/src/site/markdown/news.md
URL: 
http://svn.apache.org/viewvc/phoenix/site/source/src/site/markdown/news.md?rev=1728256&r1=1728255&r2=1728256&view=diff
==============================================================================
--- phoenix/site/source/src/site/markdown/news.md (original)
+++ phoenix/site/source/src/site/markdown/news.md Wed Feb  3 04:40:49 2016
@@ -1,6 +1,12 @@
 # Apache Phoenix News
 <br/>
 <hr/>
+#### [Announcing transaction support in 4.7.0 
release](http://phoenix.apache.org/transactions.html) (Feb 3, 2016)
+<hr/>
+<hr/>
+#### [Announcing time series optimization in Phoenix 4.6 
released](https://blogs.apache.org/phoenix/entry/new_optimization_for_time_series)
 (Oct 23, 2015)
+<hr/>
+<hr/>
 #### [Announcing Phoenix 4.5 
released](https://blogs.apache.org/phoenix/entry/announcing_phoenix_4_5_released)
 (July 29, 2015)
 <hr/>
 #### [Blog on Spark Integration in Apache 
Phoenix](https://blogs.apache.org/phoenix/entry/spark_integration_in_apache_phoenix)
 (June 29, 2015)

Modified: phoenix/site/source/src/site/markdown/recent.md
URL: 
http://svn.apache.org/viewvc/phoenix/site/source/src/site/markdown/recent.md?rev=1728256&r1=1728255&r2=1728256&view=diff
==============================================================================
--- phoenix/site/source/src/site/markdown/recent.md (original)
+++ phoenix/site/source/src/site/markdown/recent.md Wed Feb  3 04:40:49 2016
@@ -2,6 +2,7 @@
 
 As items are implemented from our road map, they are moved here to track the 
progress we've made:
 
+1. **[Transaction 
Support](https://issues.apache.org/jira/browse/PHOENIX-1674)**. Supports 
transactions by integrating with 
[Tephra](https://github.com/continuuity/tephra). **Available in our 4.7  
release**
 1. **[Asynchronous Index 
Population](secondary_indexing.html#Asynchronous_Index_Population)**. Enables 
an index to be created asynchronously using a map reduce job. **Available in 
our 4.5 release**
 2. **[User Defined Functions](udf.html)**. Allows users to create and deploy 
their own custom or domain-specific user-defined functions to the cluster. 
**Available in our 4.4 release**
 1. **[Functional Indexes](secondary_indexing.html#Functional_Indexes)**. 
Enables an index to be defined as expressions as opposed to just column names 
and have the index be used when a query contains this expression. **Available 
in our 4.3 release**

Modified: phoenix/site/source/src/site/markdown/transactions.md
URL: 
http://svn.apache.org/viewvc/phoenix/site/source/src/site/markdown/transactions.md?rev=1728256&r1=1728255&r2=1728256&view=diff
==============================================================================
--- phoenix/site/source/src/site/markdown/transactions.md (original)
+++ phoenix/site/source/src/site/markdown/transactions.md Wed Feb  3 04:40:49 
2016
@@ -85,6 +85,7 @@ An external Tephra transaction that has
 
 1. Starting a transaction on a connection with an SCN set is not allowed. 
 2. Setting the maximum number of versions property while creating a 
transactional table limits the number of snapshots available for concurrent 
transactions. 
-3. When a transaction times out or if it cannot be rolled back by the client, 
it is added to an invalid list. This list will can potentially grow if there 
are a lot of failed or timed out transactions. 
-For now, now an adminstrator can manually clear transactions from this list. 
[TEPHRA-35](https://issues.cask.co/browse/TEPHRA-35) describes ongoing work to 
automatically remove transactions from the invalid list once all data 
associated with the transaction has been removed.
+3. When a transaction times out or if it cannot be rolled back by the client, 
it is added to an invalid list. This list can potentially grow if there are a 
lot of failed or timed out transactions. 
+For now, an adminstrator can manually clear transactions from this list after 
a major compaction has occurred. 
[TEPHRA-35](https://issues.cask.co/browse/TEPHRA-35) describes ongoing work to 
automatically remove transactions from the invalid list once all data 
associated with the transaction has been removed.
+4. If adding an index asynchronously to an existing transactional table, make 
sure to run a major compaction before issuing the CREATE INDEX ASYNC command as 
otherwise invalid and/or uncommitted transactions may appear in your index 
[PHOENIX-2154](https://issues.apache.org/jira/browse/PHOENIX-2154).
 


Reply via email to