Commit 92798745 authored by Lukáš Lalinský's avatar Lukáš Lalinský

Add a table with Phoenix versions

parent 442a7aca
...@@ -39,6 +39,32 @@ used the same way you would use any other SQL database from Python, for example: ...@@ -39,6 +39,32 @@ used the same way you would use any other SQL database from Python, for example:
cursor.execute("SELECT * FROM users") cursor.execute("SELECT * FROM users")
print cursor.fetchall() print cursor.fetchall()
Phoenix versions
----------------
Multiple Phoenix versions are supported, but because there is no way in the protocol
to determine the version at runtime, you need to provide the version of Avatica
used in the Phoenix version that you are using. Below is a table of the correct
versions for the official Phoenix releases.
=============== =============== ================================
Phoenix version Avatica version Connection URL
=============== =============== ================================
4.4 1.2 ``http://localhost:8765/?v=1.2``
4.5 1.3 ``http://localhost:8765/?v=1.3``
4.6 1.3 ``http://localhost:8765/?v=1.3``
4.7 1.6 ``http://localhost:8765/?v=1.6``
=============== =============== ================================
Phoenix 4.7 uses a serialization based on Protocol Buffers (proto3) by default.
This version of Protocol Buffers does not even have a stable release
and is not generally available on Linux distributions.
This library only supports the older JSON serialization. In order for the library
to work with Phoenix 4.7, you need to start the query server like this::
./bin/queryserver.py start -Dphoenix.queryserver.serialization=JSON
Setting up a development environment Setting up a development environment
------------------------------------ ------------------------------------
...@@ -91,18 +117,6 @@ working Phoenix database and set the ``PHOENIXDB_TEST_DB_URL`` environment varia ...@@ -91,18 +117,6 @@ working Phoenix database and set the ``PHOENIXDB_TEST_DB_URL`` environment varia
export PHOENIXDB_TEST_DB_URL='http://localhost:8765/' export PHOENIXDB_TEST_DB_URL='http://localhost:8765/'
nosetests nosetests
Phoenix 4.7
-----------
Phoenix 4.7 uses a serialization based on Protocol Buffers (proto3) by default.
This version of Protocol Buffers does not even have a stable release
and is not generally available on Linux distributions.
This library only supports the older JSON serialization. In order for the library
to work with Phoenix 4.7, you need to start the query server like this::
./bin/queryserver.py start -Dphoenix.queryserver.serialization=JSON
Known issues Known issues
------------ ------------
......
...@@ -115,6 +115,7 @@ AVATICA_1_2_0 = (1, 2, 0) ...@@ -115,6 +115,7 @@ AVATICA_1_2_0 = (1, 2, 0)
AVATICA_1_3_0 = (1, 3, 0) AVATICA_1_3_0 = (1, 3, 0)
AVATICA_1_4_0 = (1, 4, 0) AVATICA_1_4_0 = (1, 4, 0)
AVATICA_1_5_0 = (1, 5, 0) AVATICA_1_5_0 = (1, 5, 0)
AVATICA_1_6_0 = (1, 6, 0)
class AvaticaClient(object): class AvaticaClient(object):
...@@ -149,6 +150,10 @@ class AvaticaClient(object): ...@@ -149,6 +150,10 @@ class AvaticaClient(object):
self.version = AVATICA_1_4_0 self.version = AVATICA_1_4_0
elif v in ('1.5.0', '1.5'): elif v in ('1.5.0', '1.5'):
self.version = AVATICA_1_5_0 self.version = AVATICA_1_5_0
elif v in ('1.6.0', '1.6'):
self.version = AVATICA_1_6_0
else:
raise errors.ProgrammingError('Unknown Avatica version')
self.max_retries = max_retries if max_retries is not None else 3 self.max_retries = max_retries if max_retries is not None else 3
self.connection = None self.connection = None
......
...@@ -2,9 +2,15 @@ ...@@ -2,9 +2,15 @@
set -e set -e
HBASE_VERSION=1.1.2 HBASE_VERSION=1.1.5
#PHOENIX_VERSION=4.7.0-HBase-1.1
PHOENIX_VERSION=4.6.0-HBase-1.1 PHOENIX_VERSION=4.6.0-HBase-1.1
#PHOENIX_VERSION=4.4.0-HBase-1.1
#APACHE_MIRROR=http://archive.apache.org/dist/
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive
echo "> Removing chef and puppet" echo "> Removing chef and puppet"
...@@ -15,7 +21,10 @@ echo "> Installing java" ...@@ -15,7 +21,10 @@ echo "> Installing java"
sudo apt-get -y update sudo apt-get -y update
sudo apt-get -y install wget openjdk-7-jdk sudo apt-get -y install wget openjdk-7-jdk
APACHE_MIRROR="$(python -c 'import json, urllib2; a = json.load(urllib2.urlopen("http://www.apache.org/dyn/closer.cgi?as_json=1")); print a["preferred"].rstrip("/")')" if [ -z "$APACHE_MIRROR" ]
then
APACHE_MIRROR="$(python -c 'import json, urllib2; a = json.load(urllib2.urlopen("http://www.apache.org/dyn/closer.cgi?as_json=1")); print a["preferred"].rstrip("/")')"
fi
echo "> Using Apache mirror: $APACHE_MIRROR" echo "> Using Apache mirror: $APACHE_MIRROR"
if [ ! -d /opt/hbase ] if [ ! -d /opt/hbase ]
...@@ -26,7 +35,7 @@ then ...@@ -26,7 +35,7 @@ then
echo "> Extracting HBase" echo "> Extracting HBase"
sudo mkdir /opt/hbase sudo mkdir /opt/hbase
sudo chown vagrant:vagrant -R /opt/hbase sudo chown vagrant:vagrant -R /opt/hbase
tar xvf /tmp/hbase-$HBASE_VERSION-bin.tar.gz --strip-components=1 -C /opt/hbase tar xf /tmp/hbase-$HBASE_VERSION-bin.tar.gz --strip-components=1 -C /opt/hbase
fi fi
if [ ! -d /opt/phoenix ] if [ ! -d /opt/phoenix ]
...@@ -37,7 +46,7 @@ then ...@@ -37,7 +46,7 @@ then
echo "> Extracting Phoenix" echo "> Extracting Phoenix"
sudo mkdir /opt/phoenix sudo mkdir /opt/phoenix
sudo chown vagrant:vagrant -R /opt/phoenix sudo chown vagrant:vagrant -R /opt/phoenix
tar xvf /tmp/phoenix-$PHOENIX_VERSION-bin.tar.gz --strip-components=1 -C /opt/phoenix tar xf /tmp/phoenix-$PHOENIX_VERSION-bin.tar.gz --strip-components=1 -C /opt/phoenix
fi fi
echo "> Linking Phoenix server JAR file to HBase lib directory" echo "> Linking Phoenix server JAR file to HBase lib directory"
...@@ -55,5 +64,6 @@ fi ...@@ -55,5 +64,6 @@ fi
if ! pgrep -f proc_phoenixserver >/dev/null if ! pgrep -f proc_phoenixserver >/dev/null
then then
echo "> Starting Phoenix query server" echo "> Starting Phoenix query server"
#sudo -u vagrant /opt/phoenix/bin/queryserver.py start -Dphoenix.queryserver.serialization=JSON
sudo -u vagrant /opt/phoenix/bin/queryserver.py start sudo -u vagrant /opt/phoenix/bin/queryserver.py start
fi fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment