Skip to content
This repository was archived by the owner on Dec 18, 2021. It is now read-only.

Commit 9279874

Browse files
committed
Add a table with Phoenix versions
1 parent 442a7ac commit 9279874

File tree

3 files changed

+45
-16
lines changed

3 files changed

+45
-16
lines changed

Diff for: README.rst

+26-12
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,32 @@ used the same way you would use any other SQL database from Python, for example:
3939
cursor.execute("SELECT * FROM users")
4040
print cursor.fetchall()
4141

42+
Phoenix versions
43+
----------------
44+
45+
Multiple Phoenix versions are supported, but because there is no way in the protocol
46+
to determine the version at runtime, you need to provide the version of Avatica
47+
used in the Phoenix version that you are using. Below is a table of the correct
48+
versions for the official Phoenix releases.
49+
50+
=============== =============== ================================
51+
Phoenix version Avatica version Connection URL
52+
=============== =============== ================================
53+
4.4 1.2 ``http://localhost:8765/?v=1.2``
54+
4.5 1.3 ``http://localhost:8765/?v=1.3``
55+
4.6 1.3 ``http://localhost:8765/?v=1.3``
56+
4.7 1.6 ``http://localhost:8765/?v=1.6``
57+
=============== =============== ================================
58+
59+
Phoenix 4.7 uses a serialization based on Protocol Buffers (proto3) by default.
60+
This version of Protocol Buffers does not even have a stable release
61+
and is not generally available on Linux distributions.
62+
63+
This library only supports the older JSON serialization. In order for the library
64+
to work with Phoenix 4.7, you need to start the query server like this::
65+
66+
./bin/queryserver.py start -Dphoenix.queryserver.serialization=JSON
67+
4268
Setting up a development environment
4369
------------------------------------
4470

@@ -91,18 +117,6 @@ working Phoenix database and set the ``PHOENIXDB_TEST_DB_URL`` environment varia
91117
export PHOENIXDB_TEST_DB_URL='http://localhost:8765/'
92118
nosetests
93119

94-
Phoenix 4.7
95-
-----------
96-
97-
Phoenix 4.7 uses a serialization based on Protocol Buffers (proto3) by default.
98-
This version of Protocol Buffers does not even have a stable release
99-
and is not generally available on Linux distributions.
100-
101-
This library only supports the older JSON serialization. In order for the library
102-
to work with Phoenix 4.7, you need to start the query server like this::
103-
104-
./bin/queryserver.py start -Dphoenix.queryserver.serialization=JSON
105-
106120
Known issues
107121
------------
108122

Diff for: phoenixdb/avatica.py

+5
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ def parse_error_json(text):
115115
AVATICA_1_3_0 = (1, 3, 0)
116116
AVATICA_1_4_0 = (1, 4, 0)
117117
AVATICA_1_5_0 = (1, 5, 0)
118+
AVATICA_1_6_0 = (1, 6, 0)
118119

119120

120121
class AvaticaClient(object):
@@ -149,6 +150,10 @@ def __init__(self, url, version=None, max_retries=None):
149150
self.version = AVATICA_1_4_0
150151
elif v in ('1.5.0', '1.5'):
151152
self.version = AVATICA_1_5_0
153+
elif v in ('1.6.0', '1.6'):
154+
self.version = AVATICA_1_6_0
155+
else:
156+
raise errors.ProgrammingError('Unknown Avatica version')
152157
self.max_retries = max_retries if max_retries is not None else 3
153158
self.connection = None
154159

Diff for: provision.sh

+14-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22

33
set -e
44

5-
HBASE_VERSION=1.1.2
5+
HBASE_VERSION=1.1.5
6+
7+
#PHOENIX_VERSION=4.7.0-HBase-1.1
8+
69
PHOENIX_VERSION=4.6.0-HBase-1.1
710

11+
#PHOENIX_VERSION=4.4.0-HBase-1.1
12+
#APACHE_MIRROR=http://archive.apache.org/dist/
13+
814
export DEBIAN_FRONTEND=noninteractive
915

1016
echo "> Removing chef and puppet"
@@ -15,7 +21,10 @@ echo "> Installing java"
1521
sudo apt-get -y update
1622
sudo apt-get -y install wget openjdk-7-jdk
1723

18-
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("/")')"
24+
if [ -z "$APACHE_MIRROR" ]
25+
then
26+
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("/")')"
27+
fi
1928
echo "> Using Apache mirror: $APACHE_MIRROR"
2029

2130
if [ ! -d /opt/hbase ]
@@ -26,7 +35,7 @@ then
2635
echo "> Extracting HBase"
2736
sudo mkdir /opt/hbase
2837
sudo chown vagrant:vagrant -R /opt/hbase
29-
tar xvf /tmp/hbase-$HBASE_VERSION-bin.tar.gz --strip-components=1 -C /opt/hbase
38+
tar xf /tmp/hbase-$HBASE_VERSION-bin.tar.gz --strip-components=1 -C /opt/hbase
3039
fi
3140

3241
if [ ! -d /opt/phoenix ]
@@ -37,7 +46,7 @@ then
3746
echo "> Extracting Phoenix"
3847
sudo mkdir /opt/phoenix
3948
sudo chown vagrant:vagrant -R /opt/phoenix
40-
tar xvf /tmp/phoenix-$PHOENIX_VERSION-bin.tar.gz --strip-components=1 -C /opt/phoenix
49+
tar xf /tmp/phoenix-$PHOENIX_VERSION-bin.tar.gz --strip-components=1 -C /opt/phoenix
4150
fi
4251

4352
echo "> Linking Phoenix server JAR file to HBase lib directory"
@@ -55,5 +64,6 @@ fi
5564
if ! pgrep -f proc_phoenixserver >/dev/null
5665
then
5766
echo "> Starting Phoenix query server"
67+
#sudo -u vagrant /opt/phoenix/bin/queryserver.py start -Dphoenix.queryserver.serialization=JSON
5868
sudo -u vagrant /opt/phoenix/bin/queryserver.py start
5969
fi

0 commit comments

Comments
 (0)