phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Johnson <matt.john...@algomi.com>
Subject RE: installing Phoenix using AWS-EMR
Date Tue, 10 Mar 2015 11:06:42 GMT
Hi John,



I haven’t used the EMR bootstrap at all so not sure this is helpful, but
generally to upgrade the version of Phoenix you just remove the
phoenix-x.x.x-server.jar from the HBase libs folder and replace it with the
version that you want, and restart HBase. The big caveat to this though is
that the versions of HBase and Phoenix need to be compatible, so if the
bootstrap is installing an older version of HBase, it may not be possible
to use a newer version of Phoenix with it – you will have to check the
Phoenix release notes to ensure the versions are compatible.



The JDBC url should point to your zookeeper cluster, in a comma-separated
list. So if you have zookeeper running on a 3-server cluster, you would use
something like:



*jdbc:phoenix:zkmachine1,zkmachine2,zkmachine3*



Hope that helps.



Cheers,

Matt



*From:* Brady, John [mailto:john.brady@intel.com]
*Sent:* 10 March 2015 10:02
*To:* user@phoenix.apache.org
*Subject:* RE: installing Phoenix using AWS-EMR



The instructions are on the Phoenix site also – main question is how to
install latest phoenix release.



http://phoenix.apache.org/phoenix_on_emr.html





*From:* Brady, John
*Sent:* Tuesday, March 10, 2015 9:56 AM
*To:* 'user@phoenix.apache.org'
*Subject:* installing Phoenix using AWS-EMR



Hi,



I’m installing Phoenix using AWS-EMR as described at the end of this link



http://java.dzone.com/articles/apache-phoenix-sql-driver



During setup you define the bootsrap action to load Phoenix onto your AWS
EMR cluster.



I’ve a 2 questions.



1.       The bootstrap action installs phoenix 2.2.0 – how do you get it to
install the latest release?



2.       If your using a JDBC connection which IP address should you
connect to? Is it the master node?



Thanks



This is my code:



*import* java.sql.*;



*public* *class* PhoenixJDBC {



     *public* *static* *void* main(String args[]) {



     *try* {

         //Register JDBC Driver

         Class.*forName*("org.apache.phoenix.jdbc.PhoenixDriver"
).newInstance();



         Connection conn = DriverManager.*getConnection*(
"jdbc:phoenix:54.xx.xx.xx","","");



         //Create a Statement class to execute the SQL statement

         Statement stmt = conn.createStatement();



         //Execute the SQL statement and get the results in a *Resultset*

         ResultSet rs = stmt.executeQuery("select * from US_POPULATION");



         // Iterate through the ResultSet, displaying two values

         // for each row using the getString method



         *while* (rs.next())

             System.*out*.println("Name= " + rs.getString("host"));

     }

     *catch* (SQLException e) {

         e.printStackTrace();

     }

     *catch* (Exception e) {

         e.printStackTrace();

     }

     }

     }





-------------------------------------------------------------
Intel Ireland Limited (Branch)
Collinstown Industrial Park, Leixlip, County Kildare, Ireland
Registered Number: E902934

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

Mime
View raw message