You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by jy...@apache.org on 2014/07/25 21:03:24 UTC
svn commit: r1613496 - in /phoenix: phoenix-docs/src/main/org/h2/
phoenix-docs/src/main/org/h2/jdbc/ phoenix-docs/src/main/org/h2/jdbcx/
phoenix-docs/src/main/org/h2/tools/ site/publish/
Author: jyates
Date: Fri Jul 25 19:03:23 2014
New Revision: 1613496
URL: http://svn.apache.org/r1613496
Log:
Actually building the site for index updates
Modified:
phoenix/phoenix-docs/src/main/org/h2/Driver.java
phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcCallableStatement.java
phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcConnection.java
phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcDatabaseMetaData.java
phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcResultSet.java
phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcStatement.java
phoenix/phoenix-docs/src/main/org/h2/jdbcx/JdbcConnectionPool.java
phoenix/phoenix-docs/src/main/org/h2/jdbcx/JdbcDataSource.java
phoenix/phoenix-docs/src/main/org/h2/tools/SimpleResultSet.java
phoenix/site/publish/secondary_indexing.html
Modified: phoenix/phoenix-docs/src/main/org/h2/Driver.java
URL: http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/main/org/h2/Driver.java?rev=1613496&r1=1613495&r2=1613496&view=diff
==============================================================================
--- phoenix/phoenix-docs/src/main/org/h2/Driver.java (original)
+++ phoenix/phoenix-docs/src/main/org/h2/Driver.java Fri Jul 25 19:03:23 2014
@@ -17,7 +17,7 @@ import org.h2.message.DbException;
import org.h2.message.TraceSystem;
import org.h2.upgrade.DbUpgrade;
-/*## Java 1.7 ##
+//## Java 1.7 ##
import java.util.logging.Logger;
//*/
@@ -138,7 +138,7 @@ public class Driver implements java.sql.
/**
* [Not supported]
*/
-/*## Java 1.7 ##
+//## Java 1.7 ##
public Logger getParentLogger() {
return null;
}
Modified: phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcCallableStatement.java
URL: http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcCallableStatement.java?rev=1613496&r1=1613495&r2=1613496&view=diff
==============================================================================
--- phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcCallableStatement.java (original)
+++ phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcCallableStatement.java Fri Jul 25 19:03:23 2014
@@ -1440,7 +1440,7 @@ public class JdbcCallableStatement exten
* @param parameterIndex the parameter index (1, 2, ...)
* @param type the class of the returned value
*/
-/*## Java 1.7 ##
+//## Java 1.7 ##
public <T> T getObject(int parameterIndex, Class<T> type) {
return null;
}
@@ -1452,7 +1452,7 @@ public class JdbcCallableStatement exten
* @param parameterName the parameter name
* @param type the class of the returned value
*/
-/*## Java 1.7 ##
+//## Java 1.7 ##
public <T> T getObject(String parameterName, Class<T> type) {
return null;
}
Modified: phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcConnection.java
URL: http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcConnection.java?rev=1613496&r1=1613495&r2=1613496&view=diff
==============================================================================
--- phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcConnection.java (original)
+++ phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcConnection.java Fri Jul 25 19:03:23 2014
@@ -49,7 +49,7 @@ import java.sql.SQLXML;
import java.sql.SQLClientInfoException;
//*/
-/*## Java 1.7 ##
+//## Java 1.7 ##
import java.util.concurrent.Executor;
//*/
@@ -1678,7 +1678,7 @@ public class JdbcConnection extends Trac
*
* @param schema the schema
*/
-/*## Java 1.7 ##
+//## Java 1.7 ##
public void setSchema(String schema) {
// not supported
}
@@ -1687,7 +1687,7 @@ public class JdbcConnection extends Trac
/**
* [Not supported]
*/
-/*## Java 1.7 ##
+//## Java 1.7 ##
public String getSchema() {
return null;
}
@@ -1698,7 +1698,7 @@ public class JdbcConnection extends Trac
*
* @param executor the executor used by this method
*/
-/*## Java 1.7 ##
+//## Java 1.7 ##
public void abort(Executor executor) {
// not supported
}
@@ -1710,7 +1710,7 @@ public class JdbcConnection extends Trac
* @param executor the executor used by this method
* @param milliseconds the TCP connection timeout
*/
-/*## Java 1.7 ##
+//## Java 1.7 ##
public void setNetworkTimeout(Executor executor, int milliseconds) {
// not supported
}
@@ -1719,7 +1719,7 @@ public class JdbcConnection extends Trac
/**
* [Not supported]
*/
-/*## Java 1.7 ##
+//## Java 1.7 ##
public int getNetworkTimeout() {
return 0;
}
Modified: phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcDatabaseMetaData.java
URL: http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcDatabaseMetaData.java?rev=1613496&r1=1613495&r2=1613496&view=diff
==============================================================================
--- phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcDatabaseMetaData.java (original)
+++ phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcDatabaseMetaData.java Fri Jul 25 19:03:23 2014
@@ -2885,7 +2885,7 @@ public class JdbcDatabaseMetaData extend
/**
* [Not supported]
*/
- /*## Java 1.7 ##
+ //## Java 1.7 ##
public boolean generatedKeyAlwaysReturned() {
return true;
}
@@ -2902,7 +2902,7 @@ public class JdbcDatabaseMetaData extend
* @param columnNamePattern null (to get all objects) or a column name
* (uppercase for unquoted names)
*/
- /*## Java 1.7 ##
+ //## Java 1.7 ##
public ResultSet getPseudoColumns(String catalog, String schemaPattern,
String tableNamePattern, String columnNamePattern) {
return null;
Modified: phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcResultSet.java
URL: http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcResultSet.java?rev=1613496&r1=1613495&r2=1613496&view=diff
==============================================================================
--- phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcResultSet.java (original)
+++ phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcResultSet.java Fri Jul 25 19:03:23 2014
@@ -3431,7 +3431,7 @@ public class JdbcResultSet extends Trace
* @param columnIndex the column index (1, 2, ...)
* @param type the class of the returned value
*/
-/*## Java 1.7 ##
+//## Java 1.7 ##
public <T> T getObject(int columnIndex, Class<T> type) {
return null;
}
@@ -3443,7 +3443,7 @@ public class JdbcResultSet extends Trace
* @param columnName the column name
* @param type the class of the returned value
*/
-/*## Java 1.7 ##
+//## Java 1.7 ##
public <T> T getObject(String columnName, Class<T> type) {
return null;
}
Modified: phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcStatement.java
URL: http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcStatement.java?rev=1613496&r1=1613495&r2=1613496&view=diff
==============================================================================
--- phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcStatement.java (original)
+++ phoenix/phoenix-docs/src/main/org/h2/jdbc/JdbcStatement.java Fri Jul 25 19:03:23 2014
@@ -876,7 +876,7 @@ public class JdbcStatement extends Trace
/**
* [Not supported]
*/
-/*## Java 1.7 ##
+//## Java 1.7 ##
public void closeOnCompletion() {
// not supported
}
@@ -885,7 +885,7 @@ public class JdbcStatement extends Trace
/**
* [Not supported]
*/
-/*## Java 1.7 ##
+//## Java 1.7 ##
public boolean isCloseOnCompletion() {
return true;
}
Modified: phoenix/phoenix-docs/src/main/org/h2/jdbcx/JdbcConnectionPool.java
URL: http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/main/org/h2/jdbcx/JdbcConnectionPool.java?rev=1613496&r1=1613495&r2=1613496&view=diff
==============================================================================
--- phoenix/phoenix-docs/src/main/org/h2/jdbcx/JdbcConnectionPool.java (original)
+++ phoenix/phoenix-docs/src/main/org/h2/jdbcx/JdbcConnectionPool.java Fri Jul 25 19:03:23 2014
@@ -35,7 +35,7 @@ import org.h2.util.New;
import org.h2.message.DbException;
//*/
-/*## Java 1.7 ##
+//## Java 1.7 ##
import java.util.logging.Logger;
//*/
@@ -330,7 +330,7 @@ public class JdbcConnectionPool implemen
/**
* [Not supported]
*/
-/*## Java 1.7 ##
+//## Java 1.7 ##
public Logger getParentLogger() {
return null;
}
Modified: phoenix/phoenix-docs/src/main/org/h2/jdbcx/JdbcDataSource.java
URL: http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/main/org/h2/jdbcx/JdbcDataSource.java?rev=1613496&r1=1613495&r2=1613496&view=diff
==============================================================================
--- phoenix/phoenix-docs/src/main/org/h2/jdbcx/JdbcDataSource.java (original)
+++ phoenix/phoenix-docs/src/main/org/h2/jdbcx/JdbcDataSource.java Fri Jul 25 19:03:23 2014
@@ -26,7 +26,7 @@ import org.h2.jdbc.JdbcConnection;
import org.h2.message.TraceObject;
import org.h2.util.StringUtils;
-/*## Java 1.7 ##
+//## Java 1.7 ##
import java.util.logging.Logger;
//*/
@@ -381,7 +381,7 @@ public class JdbcDataSource extends Trac
/**
* [Not supported]
*/
-/*## Java 1.7 ##
+//## Java 1.7 ##
public Logger getParentLogger() {
return null;
}
Modified: phoenix/phoenix-docs/src/main/org/h2/tools/SimpleResultSet.java
URL: http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/main/org/h2/tools/SimpleResultSet.java?rev=1613496&r1=1613495&r2=1613496&view=diff
==============================================================================
--- phoenix/phoenix-docs/src/main/org/h2/tools/SimpleResultSet.java (original)
+++ phoenix/phoenix-docs/src/main/org/h2/tools/SimpleResultSet.java Fri Jul 25 19:03:23 2014
@@ -853,7 +853,7 @@ public class SimpleResultSet implements
* @param columnIndex the column index (1, 2, ...)
* @param type the class of the returned value
*/
-/*## Java 1.7 ##
+//## Java 1.7 ##
public <T> T getObject(int columnIndex, Class<T> type) {
return null;
}
@@ -865,7 +865,7 @@ public class SimpleResultSet implements
* @param columnName the column name
* @param type the class of the returned value
*/
-/*## Java 1.7 ##
+//## Java 1.7 ##
public <T> T getObject(String columnName, Class<T> type) {
return null;
}
Modified: phoenix/site/publish/secondary_indexing.html
URL: http://svn.apache.org/viewvc/phoenix/site/publish/secondary_indexing.html?rev=1613496&r1=1613495&r2=1613496&view=diff
==============================================================================
--- phoenix/site/publish/secondary_indexing.html (original)
+++ phoenix/site/publish/secondary_indexing.html Fri Jul 25 19:03:23 2014
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!--
- Generated by Apache Maven Doxia at 2014-06-05
+ Generated by Apache Maven Doxia at 2014-07-25
Rendered using Reflow Maven Skin 1.1.0 (http://andriusvelykis.github.io/reflow-maven-skin)
-->
<html xml:lang="en" lang="en">
@@ -212,8 +212,64 @@
<div class="section">
<h2 id="Setup">Setup</h2>
<p>Only mutable indexing requires special configuration options in the region server to run - phoenix ensures that they are setup correctly when you enable mutable indexing on the table; if the correct properties are not set, you will not be able to turn it on.</p>
- <p>You will need to add the following parameters to <tt>hbase-site.xml</tt>: <tt> <property> <name>hbase.regionserver.wal.codec</name> <value>org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec</value> </property> </tt></p>
+ <p>You will need to add the following parameters to <tt>hbase-site.xml</tt>:</p>
+ <div class="source">
+ <pre><property>
+ <name>hbase.regionserver.wal.codec</name>
+ <value>org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec</value>
+</property>
+</pre>
+ </div>
<p>This enables custom WAL edits to be written, ensuring proper writing/replay of the index updates. This codec supports the usual host of WALEdit options, most notably WALEdit compression.</p>
+ <div class="section">
+ <h3 id="Advanced_Setup_-_Removing_Index_Deadlocks_0.98.4">Advanced Setup - Removing Index Deadlocks (0.98.4+)</h3>
+ <p>Phoenix releases that include these changes (4.1+, 5.0.0+) are still backwards compatible with older versions of phoenix (to the extent that they are semantically compatible) as well as with older versions of HBase (0.98.1-0.98.3).</p>
+ <p>As of HBase 0.98.4 we can finally remove the change of index deadlocks. In HBase you can tune the number of RPC threads to match client writes + index writes, but there is still a chance you could have a deadlock in an unlucky scenario (i.e. Client A -> Server A, Client B -> Server B, each taking the last RPC thread. Then each server attempts to make an index update to the other, Server A -> Server B, and vice versa, but they canât as there are no more available RPC threads).</p>
+ <p>As of <a class="externalLink" href="https://issues.apache.org/jira/browse/PHOENIX-938">PHOENIX-938</a> and <a class="externalLink" href="https://issues.apache.org/jira/browse/HBASE-11513">HBASE-11513</a> we can remove these deadlocks by providing a different set of RPC handlers for index updates by giving index updates their own ârpc priorityâ and handling the priorities via a custom Phoenix RPC Handler.</p>
+ <p>The properties you need to set to enable this are</p>
+ <div class="section">
+ <h4 id="Server_Side">Server Side</h4>
+ <div class="source">
+ <pre><property>
+ <name>hbase.region.server.rpc.scheduler.factory.class</name>
+ <value>org.apache.phoenix.hbase.index.ipc.PhoenixIndexRpcSchedulerFactory</value>
+ <description>Factory to create the Phoenix RPC Scheduler that knows to put index updates into index queues</description>
+</property>
+</pre>
+ </div>
+ <p>After adding these settings to your hbase-site.xml, you just need to do a rolling restart of your cluster.</p>
+ <p>Note that having the configs on both client and server side will not impact correctness or performance.</p>
+ </div>
+ <div class="section">
+ <h4 id="Tuning">Tuning</h4>
+ <p>By default, index priority range is between (1000, 1050]. Higher priorites within the index range, at this time, do not means updates are processed sooner. However, we reserve this range to provide that possibility in the future.</p>
+ <p>You can specifiy this range however to suit your individual cluster requirements by adjusting the follwing parameters</p>
+ <div class="source">
+ <pre><property>
+ <name>org.apache.phoenix.regionserver.index.priority.min</name>
+ <value>1050</value>
+ <description>Value to specify to bottom (inclusive) of the range in which index priority may lie</description>
+</property>
+<property>
+ <name>org.apache.phoenix.regionserver.index.priority.max</name>
+ <value>1050</value>
+ <description>Value to specify to top (exclusive) of the range in which index priority may lie</description>
+</property>
+</pre>
+ </div>
+ <p>The number of RPC Handler Threads can be specified via:</p>
+ <div class="source">
+ <pre><property>
+ <name>org.apache.phoenix.regionserver.index.handler.count</name>
+ <value>30</value>
+ <description>Number of threads to use when serving index write requests</description>
+</property>
+</pre>
+ </div>
+ <p>Though the actual number of threads is dictated by the Max(number of call queues, handler count), where the number of call queues is determined by standard HBase configuration (see below).</p>
+ <p>To further tune the queues, you can adjust the standard rpc queue length parameters (currently, there are no special knobs for the index queues), specifically âipc.server.max.callqueue.lengthâ and âipc.server.callqueue.handler.factorâ. See the <a class="externalLink" href="http://hbase.apache.org/book.html">HBase Reference Guide</a> for more details.</p>
+ </div>
+ </div>
</div>
<div class="section">
<h2 id="Tuning">Tuning</h2>