python连接Phoenix实例教程
import jpype
import jaydebeapi
import os
import os.path
phoenix_client_jar="/usr/hdp/current/phoenix-client/phoenix-client.jar"
args='-Djava.class.path=%s'% phoenix_client_jar
jvm_path=jpype.getDefaultJVMPath()
jpype.startJVM(jvm_path,args)
conn = jaydebeapi.connect('org.apache.phoenix.jdbc.PhoenixDriver', \
'jdbc:phoenix:node3:2181:/hbase-unsecure', ['', ''], \
'/usr/hdp/current/phoenix-client/phoenix-client.jar')
curs = conn.cursor()
curs.execute('select DISTINCT(\"TABLE_NAME\") from SYSTEM.CATALOG')
print curs.fetchall()