import jpype import jaydebeapi import os phoenix_client_jar="/data/users/huser/phoenix/phoenix-4.3.0-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:bj-g2hdp1,bj-g2hdp2,bj-g2hdp3:2181','',''],phoenix_clinent_jar) curs=conn.cursor() sql="select * from test" count=curs.execute(sql) results=curs.fetchall() for r in results: print r
以上就是Python实现连接phoenix的实例的详细内容,更多请关注Gxl网其它相关文章!
查看更多关于Python实现连接phoenix的实例的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did84397