Author: jamestaylor
Date: Wed Sep 28 15:53:45 2016
New Revision: 1762687

URL: http://svn.apache.org/viewvc?rev=1762687&view=rev
Log:
PHOENIX-3335 Improve documention of unsigned_long type mapping (William Yang)

Modified:
    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/source/src/site/markdown/faq.md

Modified: phoenix/site/publish/faq.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/faq.html?rev=1762687&r1=1762686&r2=1762687&view=diff
==============================================================================
--- phoenix/site/publish/faq.html (original)
+++ phoenix/site/publish/faq.html Wed Sep 28 15:53:45 2016
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2016-09-14
+ Generated by Apache Maven Doxia at 2016-09-28
  Rendered using Reflow Maven Skin 1.1.0 
(http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">
@@ -246,8 +246,8 @@ public class test {
  </div> 
  <div class="section"> 
   <h3 id="How_I_map_Phoenix_table_to_an_existing_HBase_table">How I map 
Phoenix table to an existing HBase table?</h3> 
-  <p>You can create both a Phoenix table or view through the CREATE 
TABLE/CREATE VIEW DDL statement on a pre-existing HBase table. In both cases, 
we’ll leave the HBase metadata as-is, except for with a TABLE we turn 
KEEP_DELETED_CELLS on. For CREATE TABLE, we’ll create any metadata (table, 
column families) that doesn’t already exist. We’ll also add an empty key 
value for each row so that queries behave as expected (without requiring all 
columns to be projected during scans).</p> 
-  <p>The other caveat is that the way the bytes were serialized must match the 
way the bytes are serialized by Phoenix. For VARCHAR,CHAR, and UNSIGNED_* 
types, we use the HBase Bytes methods. The CHAR type expects only single-byte 
characters and the UNSIGNED types expect values greater than or equal to 
zero.</p> 
+  <p>You can create both a Phoenix table or view through the CREATE 
TABLE/CREATE VIEW DDL statement on a pre-existing HBase table. In both cases, 
we’ll leave the HBase metadata as-is. For CREATE TABLE, we’ll create any 
metadata (table, column families) that doesn’t already exist. We’ll also 
add an empty key value for each row so that queries behave as expected (without 
requiring all columns to be projected during scans).</p> 
+  <p>The other caveat is that the way the bytes were serialized must match the 
way the bytes are serialized by Phoenix. For VARCHAR,CHAR, and UNSIGNED_* 
types, we use the HBase Bytes methods. The CHAR type expects only single-byte 
characters and the UNSIGNED types expect values greater than or equal to zero. 
For signed types(TINYINT, SMALLINT, INTEGER and BIGINT), Phoenix will flip the 
first bit so that negative values will sort before positive values. Because 
HBase sorts row keys in lexicographical order and negative value’s first bit 
is 1 while positive 0 so that negative value is ‘greater than’ positive 
value if we don’t flip the first bit. So if you stored integers by HBase 
native API and want to access them by Phoenix, make sure that all your data 
types are UNSIGNED types.</p> 
   <p>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.</p> 
   <p>If you create an HBase table like this:</p> 
   <p><tt>create 't1', {NAME =&gt; 'f1', VERSIONS =&gt; 5}</tt></p> 

Modified: phoenix/site/publish/language/datatypes.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/language/datatypes.html?rev=1762687&r1=1762686&r2=1762687&view=diff
==============================================================================
--- phoenix/site/publish/language/datatypes.html (original)
+++ phoenix/site/publish/language/datatypes.html Wed Sep 28 15:53:45 2016
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2016-09-14
+ Generated by Apache Maven Doxia at 2016-09-28
  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=1762687&r1=1762686&r2=1762687&view=diff
==============================================================================
--- phoenix/site/publish/language/functions.html (original)
+++ phoenix/site/publish/language/functions.html Wed Sep 28 15:53:45 2016
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2016-09-14
+ Generated by Apache Maven Doxia at 2016-09-28
  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=1762687&r1=1762686&r2=1762687&view=diff
==============================================================================
--- phoenix/site/publish/language/index.html (original)
+++ phoenix/site/publish/language/index.html Wed Sep 28 15:53:45 2016
@@ -1,7 +1,7 @@
 
 <!DOCTYPE html>
 <!--
- Generated by Apache Maven Doxia at 2016-09-14
+ Generated by Apache Maven Doxia at 2016-09-28
  Rendered using Reflow Maven Skin 1.1.0 
(http://andriusvelykis.github.io/reflow-maven-skin)
 -->
 <html  xml:lang="en" lang="en">

Modified: phoenix/site/source/src/site/markdown/faq.md
URL: 
http://svn.apache.org/viewvc/phoenix/site/source/src/site/markdown/faq.md?rev=1762687&r1=1762686&r2=1762687&view=diff
==============================================================================
--- phoenix/site/source/src/site/markdown/faq.md (original)
+++ phoenix/site/source/src/site/markdown/faq.md Wed Sep 28 15:53:45 2016
@@ -114,9 +114,9 @@ Upsert CSV bulk data
 
 ### How I map Phoenix table to an existing HBase table?
 
-You can create both a Phoenix table or view through the CREATE TABLE/CREATE 
VIEW DDL statement on a pre-existing HBase table. In both cases, we'll leave 
the HBase metadata as-is, except for with a TABLE we turn KEEP_DELETED_CELLS 
on. For CREATE TABLE, we'll create any metadata (table, column families) that 
doesn't already exist. We'll also add an empty key value for each row so that 
queries behave as expected (without requiring all columns to be projected 
during scans).
+You can create both a Phoenix table or view through the CREATE TABLE/CREATE 
VIEW DDL statement on a pre-existing HBase table. In both cases, we'll leave 
the HBase metadata as-is. For CREATE TABLE, we'll create any metadata (table, 
column families) that doesn't already exist. We'll also add an empty key value 
for each row so that queries behave as expected (without requiring all columns 
to be projected during scans).
 
-The other caveat is that the way the bytes were serialized must match the way 
the bytes are serialized by Phoenix. For VARCHAR,CHAR, and UNSIGNED_* types, we 
use the HBase Bytes methods. The CHAR type expects only single-byte characters 
and the UNSIGNED types expect values greater than or equal to zero.
+The other caveat is that the way the bytes were serialized must match the way 
the bytes are serialized by Phoenix. For VARCHAR,CHAR, and UNSIGNED_* types, we 
use the HBase Bytes methods. The CHAR type expects only single-byte characters 
and the UNSIGNED types expect values greater than or equal to zero. For signed 
types(TINYINT, SMALLINT, INTEGER and BIGINT), Phoenix will flip the first bit 
so that negative values will sort before positive values. Because HBase sorts 
row keys in lexicographical order and negative value's first bit is 1 while 
positive 0 so that negative value is 'greater than' positive value if we don't 
flip the first bit. So if you stored integers by HBase native API and want to 
access them by Phoenix, make sure that all your data types are UNSIGNED types.
 
 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.
 


Reply via email to