Author: jamestaylor
Date: Wed Aug 17 23:48:20 2016
New Revision: 1756695
URL: http://svn.apache.org/viewvc?rev=1756695&view=rev
Log:
Update docs to reflect 4.8 namespace feature (Ankit Singhal)
Modified:
phoenix/phoenix-docs/src/docsrc/help/phoenix.csv
phoenix/site/publish/faq.html
phoenix/site/publish/language/datatypes.html
phoenix/site/publish/language/functions.html
phoenix/site/publish/language/index.html
phoenix/site/publish/paged.html
phoenix/site/publish/tuning.html
phoenix/site/source/src/site/markdown/faq.md
phoenix/site/source/src/site/markdown/paged.md
phoenix/site/source/src/site/markdown/tuning.md
Modified: phoenix/phoenix-docs/src/docsrc/help/phoenix.csv
URL:
http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/docsrc/help/phoenix.csv?rev=1756695&r1=1756694&r2=1756695&view=diff
==============================================================================
--- phoenix/phoenix-docs/src/docsrc/help/phoenix.csv (original)
+++ phoenix/phoenix-docs/src/docsrc/help/phoenix.csv Wed Aug 17 23:48:20 2016
@@ -15,6 +15,7 @@ An optional hint may be used to override
","
SELECT * FROM TEST LIMIT 1000;
+SELECT * FROM TEST LIMIT 1000 OFFSET 100;
SELECT full_name FROM SALES_PERSON WHERE ranking >= 5.0
UNION ALL SELECT reviewer_name FROM CUSTOMER_REVIEW WHERE score >= 8.0
"
@@ -288,6 +289,40 @@ UPDATE STATISTICS my_table COLUMNS
UPDATE STATISTICS my_table SET phoenix.stats.guidepost.width=50000000
"
+"Commands","CREATE SCHEMA","
+CREATE SCHEMA [IF NOT EXISTS] schemaName
+","
+creates a schema and corresponding name-space in hbase. To enable namespace
mapping, see https://phoenix.apache.org/tuning.html
+
+User that execute this command should have admin permissions to create
namespace in HBase.
+","
+CREATE SCHEMA IF NOT EXISTS my_schema
+CREATE SCHEMA my_schema
+"
+
+"Commands","USE","
+USE { schemaName | DEFAULT }
+","
+Sets a default schema for the connection and is used as a target schema for
all statements issued from the connection that do not specify schema name
explicitly.
+USE DEFAULT unset the schema for the connection so that no schema will be used
for the statements issued from the connection.
+
+schemaName should already be existed for the USE SCHEMA statement to succeed.
see CREATE SCHEMA for creating schema.
+","
+USE my_schema
+USE DEFAULT
+"
+
+"Commands","DROP SCHEMA","
+DROP SCHEMA [IF EXISTS] schemaName
+","
+Drops a schema and corresponding name-space from hbase. To enable namespace
mapping, see https://phoenix.apache.org/tuning.html
+
+This statement succeed only when schema doesn't hold any tables.
+","
+DROP SCHEMA IF EXISTS my_schema
+DROP SCHEMA my_schema
+"
+
"Other Grammar","Options","
{ [familyName .] name= value } [,...]
","
Modified: phoenix/site/publish/faq.html
URL:
http://svn.apache.org/viewvc/phoenix/site/publish/faq.html?rev=1756695&r1=1756694&r2=1756695&view=diff
==============================================================================
--- phoenix/site/publish/faq.html (original)
+++ phoenix/site/publish/faq.html Wed Aug 17 23:48:20 2016
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!--
- Generated by Apache Maven Doxia at 2016-08-11
+ Generated by Apache Maven Doxia at 2016-08-16
Rendered using Reflow Maven Skin 1.1.0
(http://andriusvelykis.github.io/reflow-maven-skin)
-->
<html xml:lang="en" lang="en">
@@ -163,6 +163,7 @@
<li><a href="#Why_isnt_my_query_doing_a_RANGE_SCAN">Why isnât my query
doing a RANGE SCAN?</a></li>
<li><a href="#Should_I_pool_Phoenix_JDBC_Connections">Should I pool Phoenix
JDBC Connections?</a></li>
<li><a href="#Why_empty_key_value">Why does Phoenix add an empty or dummy
KeyValue when doing an upsert?</a></li>
+ <li><a href="#map_table_namespace">How to move existing table with schema to
namespace?</a></li>
</ul>
<div class="section">
<div class="section">
@@ -375,6 +376,18 @@ conn.commit();
<p>Now consider JDBC row which has an integer primary key, and several
columns which are all null. In order to be able to store the primary key, a
KeyValue needs to be stored to show that the row is present at all. This column
is represented by the empty column that youâve noticed. This allows doing a
âSELECT * FROM TABLEâ and receiving records for all rows, even those whose
non-pk columns are null.</p>
<p>The same issue comes up even if only one column is null for some (or all)
records. A scan over Phoenix will include the empty column to ensure that rows
that only consist of the primary key (and have null for all non-key columns)
will be included in a scan result.</p>
</div>
+ <div class="section">
+ <h3 id="map_table_namespace">How to move existing table with schema to
namespace?<a
name="How_to_move_existing_table_with_schema_to_namespace"></a></h3>
+ <p><b>Pre-requisite:</b> you need 4.8 or higher version to map table to a
namespae. To enable namespace mapping in configuration, see <a
href="tuning.html">tuning.html</a></p>
+ <p>For kerberized environment, run with the user who have sufficient
permissiont(âadminâ) to create a namespace.</p>
+ <p>Table will be mapped to namespace of name âschema_nameâ only ,
Currently we donât support migrating existing table to different schema or
namespace.</p>
+ <p>Usage example:</p>
+ <p>Move table(âtable_nameâ) to namespace of name âschema_nameâ</p>
+ <div class="source">
+ <pre>$ bin/psql.py <zookeeper> -m
<schema_name>.<table_name>
+</pre>
+ </div>
+ </div>
</div>
</div>
</div>
Modified: phoenix/site/publish/language/datatypes.html
URL:
http://svn.apache.org/viewvc/phoenix/site/publish/language/datatypes.html?rev=1756695&r1=1756694&r2=1756695&view=diff
==============================================================================
--- phoenix/site/publish/language/datatypes.html (original)
+++ phoenix/site/publish/language/datatypes.html Wed Aug 17 23:48:20 2016
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!--
- Generated by Apache Maven Doxia at 2016-08-11
+ Generated by Apache Maven Doxia at 2016-08-16
Rendered using Reflow Maven Skin 1.1.0
(http://andriusvelykis.github.io/reflow-maven-skin)
-->
<html xml:lang="en" lang="en">
Modified: phoenix/site/publish/language/functions.html
URL:
http://svn.apache.org/viewvc/phoenix/site/publish/language/functions.html?rev=1756695&r1=1756694&r2=1756695&view=diff
==============================================================================
--- phoenix/site/publish/language/functions.html (original)
+++ phoenix/site/publish/language/functions.html Wed Aug 17 23:48:20 2016
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!--
- Generated by Apache Maven Doxia at 2016-08-11
+ Generated by Apache Maven Doxia at 2016-08-16
Rendered using Reflow Maven Skin 1.1.0
(http://andriusvelykis.github.io/reflow-maven-skin)
-->
<html xml:lang="en" lang="en">
Modified: phoenix/site/publish/language/index.html
URL:
http://svn.apache.org/viewvc/phoenix/site/publish/language/index.html?rev=1756695&r1=1756694&r2=1756695&view=diff
==============================================================================
--- phoenix/site/publish/language/index.html (original)
+++ phoenix/site/publish/language/index.html Wed Aug 17 23:48:20 2016
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!--
- Generated by Apache Maven Doxia at 2016-08-11
+ Generated by Apache Maven Doxia at 2016-08-16
Rendered using Reflow Maven Skin 1.1.0
(http://andriusvelykis.github.io/reflow-maven-skin)
-->
<html xml:lang="en" lang="en">
@@ -190,6 +190,12 @@
<a href="#explain">EXPLAIN</a><br />
<a href="#update_statistics">UPDATE STATISTICS</a><br />
+
+ <a href="#create_schema">CREATE SCHEMA</a><br />
+
+ <a href="#use">USE</a><br />
+
+ <a href="#drop_schema">DROP SCHEMA</a><br />
</p>
syntax-end -->
<!-- railroad-start -->
@@ -208,9 +214,9 @@ syntax-end -->
<a href="#create_table" >CREATE TABLE</a><br />
<a href="#drop_table" >DROP TABLE</a><br />
- </td><td class="index">
<a href="#create_function" >CREATE FUNCTION</a><br />
+ </td><td class="index">
<a href="#drop_function" >DROP FUNCTION</a><br />
@@ -221,11 +227,11 @@ syntax-end -->
<a href="#create_sequence" >CREATE SEQUENCE</a><br />
<a href="#drop_sequence" >DROP SEQUENCE</a><br />
- </td><td class="index">
<a href="#alter" >ALTER</a><br />
<a href="#create_index" >CREATE INDEX</a><br />
+ </td><td class="index">
<a href="#drop_index" >DROP INDEX</a><br />
@@ -234,6 +240,12 @@ syntax-end -->
<a href="#explain" >EXPLAIN</a><br />
<a href="#update_statistics" >UPDATE STATISTICS</a><br />
+
+ <a href="#create_schema" >CREATE SCHEMA</a><br />
+
+ <a href="#use" >USE</a><br />
+
+ <a href="#drop_schema" >DROP SCHEMA</a><br />
</td>
</tr>
</table>
@@ -501,7 +513,7 @@ syntax-end -->
<p>Selects data from one or more tables. <code>UNION ALL</code> combines rows
from multiple select statements. <code>ORDER BY</code> sorts the result based
on the given expressions. <code>LIMIT</code>(or <code>FETCH FIRST</code>)
limits the number of rows returned by the query with no limit applied if
unspecified or specified as null or less than zero. The <code>LIMIT</code>(or
<code>FETCH FIRST</code>) clause is executed after the <code>ORDER BY</code>
clause to support top-N type queries. <code>OFFSET</code> clause skips that
many rows before beginning to return rows. An optional hint may be used to
override decisions made by the query optimizer.</p>
<p>Example:</p>
<p class="notranslate">
-SELECT * FROM TEST LIMIT 1000;<br />SELECT full_name FROM SALES_PERSON WHERE
ranking >= 5.0<br /> UNION ALL SELECT reviewer_name
FROM CUSTOMER_REVIEW WHERE score >= 8.0</p>
+SELECT * FROM TEST LIMIT 1000;<br />SELECT * FROM TEST LIMIT 1000 OFFSET
100;<br />SELECT full_name FROM SALES_PERSON WHERE ranking >= 5.0<br
/> UNION ALL SELECT reviewer_name FROM CUSTOMER_REVIEW
WHERE score >= 8.0</p>
<h3 id="upsert_values" class="notranslate">UPSERT VALUES</h3>
<!-- railroad-start -->
@@ -856,6 +868,63 @@ syntax-end -->
<p class="notranslate">
UPDATE STATISTICS my_table<br />UPDATE STATISTICS my_schema.my_table INDEX<br
/>UPDATE STATISTICS my_index<br />UPDATE STATISTICS my_table COLUMNS<br
/>UPDATE STATISTICS my_table SET phoenix.stats.guidepost.width=50000000</p>
+<h3 id="create_schema" class="notranslate">CREATE SCHEMA</h3>
+<!-- railroad-start -->
+<pre name="bnf" style="display: none">
+CREATE SCHEMA [IF NOT EXISTS] <a href="index.html#name">schemaName</a>
+</pre>
+<div name="railroad">
+<table class="railroad"><tr class="railroad"><td class="d"><code
class="c">CREATE SCHEMA</code></td><td class="d"><table class="railroad"><tr
class="railroad"><td class="ts"></td><td class="d"> </td><td
class="te"></td></tr><tr class="railroad"><td class="ls"></td><td
class="d"><table class="railroad"><tr class="railroad"><td class="d"><code
class="c">IF NOT EXISTS</code></td></tr></table></td><td
class="le"></td></tr></table></td><td class="d"><code class="c"><a
href="index.html#name">schemaName</a></code></td></tr></table>
+</div>
+<!-- railroad-end -->
+<!-- syntax-start
+<pre>
+CREATE SCHEMA [IF NOT EXISTS] <a href="index.html#name">schemaName</a>
+</pre>
+syntax-end -->
+<p>creates a schema and corresponding name-space in hbase. To enable namespace
mapping, see https://phoenix.apache.org/tuning.html</p><p>User that execute
this command should have admin permissions to create namespace in
<code>HBase</code>.</p>
+<p>Example:</p>
+<p class="notranslate">
+CREATE SCHEMA IF NOT EXISTS my_schema<br />CREATE SCHEMA my_schema</p>
+
+<h3 id="use" class="notranslate">USE</h3>
+<!-- railroad-start -->
+<pre name="bnf" style="display: none">
+USE { <a href="index.html#name">schemaName</a> | DEFAULT }
+</pre>
+<div name="railroad">
+<table class="railroad"><tr class="railroad"><td class="d"><code
class="c">USE</code></td><td class="d"><table class="railroad"><tr
class="railroad"><td class="ts"></td><td class="d"><code class="c"><a
href="index.html#name">schemaName</a></code></td><td class="te"></td></tr><tr
class="railroad"><td class="ls"></td><td class="d"><code
class="c">DEFAULT</code></td><td class="le"></td></tr></table></td></tr></table>
+</div>
+<!-- railroad-end -->
+<!-- syntax-start
+<pre>
+USE { <a href="index.html#name">schemaName</a> | DEFAULT }
+</pre>
+syntax-end -->
+<p>Sets a default schema for the connection and is used as a target schema for
all statements issued from the connection that do not specify schema name
explicitly. <code>USE DEFAULT</code> unset the schema for the connection so
that no schema will be used for the statements issued from the
connection.</p><p>schemaName should already be existed for the <code>USE
SCHEMA</code> statement to succeed. see <code>CREATE SCHEMA</code> for creating
schema.</p>
+<p>Example:</p>
+<p class="notranslate">
+USE my_schema<br />USE DEFAULT</p>
+
+<h3 id="drop_schema" class="notranslate">DROP SCHEMA</h3>
+<!-- railroad-start -->
+<pre name="bnf" style="display: none">
+DROP SCHEMA [IF EXISTS] <a href="index.html#name">schemaName</a>
+</pre>
+<div name="railroad">
+<table class="railroad"><tr class="railroad"><td class="d"><code
class="c">DROP SCHEMA</code></td><td class="d"><table class="railroad"><tr
class="railroad"><td class="ts"></td><td class="d"> </td><td
class="te"></td></tr><tr class="railroad"><td class="ls"></td><td
class="d"><table class="railroad"><tr class="railroad"><td class="d"><code
class="c">IF EXISTS</code></td></tr></table></td><td
class="le"></td></tr></table></td><td class="d"><code class="c"><a
href="index.html#name">schemaName</a></code></td></tr></table>
+</div>
+<!-- railroad-end -->
+<!-- syntax-start
+<pre>
+DROP SCHEMA [IF EXISTS] <a href="index.html#name">schemaName</a>
+</pre>
+syntax-end -->
+<p>Drops a schema and corresponding name-space from hbase. To enable namespace
mapping, see https://phoenix.apache.org/tuning.html</p><p>This statement
succeed only when schema doesn't hold any tables.</p>
+<p>Example:</p>
+<p class="notranslate">
+DROP SCHEMA IF EXISTS my_schema<br />DROP SCHEMA my_schema</p>
+
<h3 id="constraint" class="notranslate">Constraint</h3>
<!-- railroad-start -->
Modified: phoenix/site/publish/paged.html
URL:
http://svn.apache.org/viewvc/phoenix/site/publish/paged.html?rev=1756695&r1=1756694&r2=1756695&view=diff
==============================================================================
--- phoenix/site/publish/paged.html (original)
+++ phoenix/site/publish/paged.html Wed Aug 17 23:48:20 2016
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!--
- Generated by Apache Maven Doxia at 2016-08-11
+ Generated by Apache Maven Doxia at 2016-08-16
Rendered using Reflow Maven Skin 1.1.0
(http://andriusvelykis.github.io/reflow-maven-skin)
-->
<html xml:lang="en" lang="en">
@@ -199,7 +199,7 @@ LIMIT 20
FROM library
WHERE published_date > 2010
ORDER BY title, author, isbn
-OFFSET 10 LIMIT 10
+LIMIT 10 OFFSET 10
</pre>
</div>
<p>Offset reads and skips the rows on the server or client depending upon the
type of the query whereas RVC is effective for queries reading on primary axis
as it can simply starts from the key provided.</p>
Modified: phoenix/site/publish/tuning.html
URL:
http://svn.apache.org/viewvc/phoenix/site/publish/tuning.html?rev=1756695&r1=1756694&r2=1756695&view=diff
==============================================================================
--- phoenix/site/publish/tuning.html (original)
+++ phoenix/site/publish/tuning.html Wed Aug 17 23:48:20 2016
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!--
- Generated by Apache Maven Doxia at 2016-08-11
+ Generated by Apache Maven Doxia at 2016-08-16
Rendered using Reflow Maven Skin 1.1.0
(http://andriusvelykis.github.io/reflow-maven-skin)
-->
<html xml:lang="en" lang="en">
@@ -407,6 +407,16 @@
<td style="text-align: left;"> Determines whether or not transactions are
enabled in Phoenix. A table may not be declared as transactional if
transactions are disabled. Default is false. This is a client side parameter.
Available starting from Phoenix 4.7.</td>
<td>false</td>
</tr>
+ <tr class="b">
+ <td><small>phoenix.schema.isNamespaceMappingEnabled</small></td>
+ <td style="text-align: left;">If it is enabled, then the tables created
with schema will be mapped to namespace.This needs to be set at client and
server both. if set once, should not be rollback. Old client will not work
after this property is enabled.</td>
+ <td>false</td>
+ </tr>
+ <tr class="a">
+ <td><small>phoenix.schema.mapSystemTablesToNamespace</small></td>
+ <td style="text-align: left;">Enabling this property will take affect when
phoenix.connection.isNamespaceMappingEnabled is also set to true. If it is
enabled, SYSTEM tables if present will automatically migrated to SYSTEM
namespace. And If set to false , then system tables will be created in default
namespace only. This needs to be set at client and server both.</td>
+ <td>true</td>
+ </tr>
</tbody>
</table>
<br />
Modified: phoenix/site/source/src/site/markdown/faq.md
URL:
http://svn.apache.org/viewvc/phoenix/site/source/src/site/markdown/faq.md?rev=1756695&r1=1756694&r2=1756695&view=diff
==============================================================================
--- phoenix/site/source/src/site/markdown/faq.md (original)
+++ phoenix/site/source/src/site/markdown/faq.md Wed Aug 17 23:48:20 2016
@@ -13,6 +13,7 @@
* [Why isn't my query doing a RANGE
SCAN?](#Why_isnt_my_query_doing_a_RANGE_SCAN)
* [Should I pool Phoenix JDBC
Connections?](#Should_I_pool_Phoenix_JDBC_Connections)
* [Why does Phoenix add an empty or dummy KeyValue when doing an
upsert?](#Why_empty_key_value)
+* [How to move existing table with schema to namespace?](#map_table_namespace)
### I want to get started. Is there a Phoenix _Hello World_?
@@ -308,3 +309,15 @@ all) records. A scan over Phoenix will i
ensure that rows that only consist of the primary key (and have null
for all non-key columns) will be included in a scan result.
+### <a id="map_table_namespace"/>How to move existing table with schema to
namespace?
+**Pre-requisite:** you need 4.8 or higher version to map table to a namespae.
To enable namespace mapping in configuration, see [tuning.html](tuning.html)
+
+For kerberized environment, run with the user who have sufficient
permissiont("admin") to create a namespace.
+
+Table will be mapped to namespace of name "schema_name" only , Currently we
don't support migrating existing table to different schema or namespace.
+
+Usage example:
+
+Move table('table_name') to namespace of name 'schema_name'
+
+ $ bin/psql.py <zookeeper> -m <schema_name>.<table_name>
Modified: phoenix/site/source/src/site/markdown/paged.md
URL:
http://svn.apache.org/viewvc/phoenix/site/source/src/site/markdown/paged.md?rev=1756695&r1=1756694&r2=1756695&view=diff
==============================================================================
--- phoenix/site/source/src/site/markdown/paged.md (original)
+++ phoenix/site/source/src/site/markdown/paged.md Wed Aug 17 23:48:20 2016
@@ -47,6 +47,6 @@ For example, If page size is 10, then to
FROM library
WHERE published_date > 2010
ORDER BY title, author, isbn
- OFFSET 10 LIMIT 10
+ LIMIT 10 OFFSET 10
Offset reads and skips the rows on the server or client depending upon the
type of the query whereas RVC is effective for queries reading on primary axis
as it can simply starts from the key provided.
Modified: phoenix/site/source/src/site/markdown/tuning.md
URL:
http://svn.apache.org/viewvc/phoenix/site/source/src/site/markdown/tuning.md?rev=1756695&r1=1756694&r2=1756695&view=diff
==============================================================================
--- phoenix/site/source/src/site/markdown/tuning.md (original)
+++ phoenix/site/source/src/site/markdown/tuning.md Wed Aug 17 23:48:20 2016
@@ -142,5 +142,7 @@ overridden at connection
<tr><td><small>phoenix.table.default.store.nulls</small></td><td
style="text-align: left;">The default value of the STORE_NULLS flag used for
table creation which determines whether or not null values should be explicitly
stored in HBase. Default is false. This is a client side parameter. Available
starting from Phoenix 4.3.</td><td>false</td></tr>
<tr><td><small>phoenix.table.istransactional.default</small></td><td
style="text-align: left;">The default value of the TRANSACTIONAL flag used for
table creation which determines whether or not a table is transactional .
Default is false. This is a client side parameter. Available starting from
Phoenix 4.7.</td><td>false</td></tr>
<tr><td><small>phoenix.transactions.enabled</small></td><td style="text-align:
left;"> Determines whether or not transactions are enabled in Phoenix. A table
may not be declared as transactional if transactions are disabled. Default is
false. This is a client side parameter. Available starting from Phoenix
4.7.</td><td>false</td></tr>
+<tr><td><small>phoenix.schema.isNamespaceMappingEnabled</small></td><td
style="text-align: left;">If it is enabled, then the tables created with schema
will be mapped to namespace.This needs to be set at client and server both. if
set once, should not be rollback. Old client will not work after this property
is enabled.</td><td>false</td></tr>
+<tr><td><small>phoenix.schema.mapSystemTablesToNamespace</small></td><td
style="text-align: left;">Enabling this property will take affect when
phoenix.connection.isNamespaceMappingEnabled is also set to true. If it is
enabled, SYSTEM tables if present will automatically migrated to SYSTEM
namespace. And If set to false , then system tables will be created in default
namespace only. This needs to be set at client and server
both.</td><td>true</td></tr>
</tbody></table>
<br />