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:
cursor.execute("SELECT * FROM users")
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
------------------------------------
......@@ -91,18 +117,6 @@ working Phoenix database and set the ``PHOENIXDB_TEST_DB_URL`` environment varia
export PHOENIXDB_TEST_DB_URL='http://localhost:8765/'
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
------------
......
......@@ -115,6 +115,7 @@ AVATICA_1_2_0 = (1, 2, 0)
AVATICA_1_3_0 = (1, 3, 0)
AVATICA_1_4_0 = (1, 4, 0)
AVATICA_1_5_0 = (1, 5, 0)
AVATICA_1_6_0 = (1, 6, 0)
class AvaticaClient(object):
......@@ -149,6 +150,10 @@ class AvaticaClient(object):
self.version = AVATICA_1_4_0
elif v in ('1.5.0', '1.5'):
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.connection = None
......
......@@ -2,9 +2,15 @@
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.4.0-HBase-1.1
#APACHE_MIRROR=http://archive.apache.org/dist/
export DEBIAN_FRONTEND=noninteractive
echo "> Removing chef and puppet"
......@@ -15,7 +21,10 @@ echo "> Installing java"
sudo apt-get -y update
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"
if [ ! -d /opt/hbase ]
......@@ -26,7 +35,7 @@ then
echo "> Extracting HBase"
sudo mkdir /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
if [ ! -d /opt/phoenix ]
......@@ -37,7 +46,7 @@ then
echo "> Extracting Phoenix"
sudo mkdir /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
echo "> Linking Phoenix server JAR file to HBase lib directory"
......@@ -55,5 +64,6 @@ fi
if ! pgrep -f proc_phoenixserver >/dev/null
then
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
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