2015년 1월 3일 토요일

[cdh-user] Install phoenix in cloudera

Could anybody help me out to install phoenix on top of hbase ? I am using cdh4.5 with cm4.8.



What's ur version of hbase that will help me to know what version of Phoenix would work.

Once you confirm I will give u steps. 



Thanks for your reply, my hbase version is HBase 0.94.6-cdh4.5.0



Then you can install the Phoenix 3.x version. 

Google Phoenix download and then get the 3.x version and untar it in a folder.

It will come with a file like Phoenix3*core*.jar copy that on all the region servers in /usr/lib/hbase/lib.the class path of hbase.

Once that's done restart your hbase and in the same folder what you have untar also has a sql*.py python script run that.

Make sure you have java path set. If you want to load some dummy data you can run the performance. py python script. 

Hope this helps.



You wouldn't happen to have instructions for CDH 5.3 
hbase is 0.98.6+cdh5.3.0+73
I downloaded
 phoenix-4.2.2-bin.tar.gz
untarred it and copied the phoenix-4.2.2-server.jar
to lib/hbase/lib
and the cluster has been restarted after each region got the same treatment. 

When I invoke sqllite.py localhost
I get the following 
phoenix-4.2.2-bin/bin$ ./sqlline.py localhost
Setting property: [isolation, TRANSACTION_READ_COMMITTED]
issuing: !connect jdbc:phoenix:localhost none none org.apache.phoenix.jdbc.PhoenixDriver
Connecting to jdbc:phoenix:localhost
java.lang.UnsupportedClassVersionError: org/apache/phoenix/jdbc/PhoenixDriver : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at sqlline.SqlLine$DatabaseConnection.connect(SqlLine.java:4608)
        at sqlline.SqlLine$DatabaseConnection.getConnection(SqlLine.java:4701)
        at sqlline.SqlLine$Commands.connect(SqlLine.java:3942)
        at sqlline.SqlLine$Commands.connect(SqlLine.java:3851)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at sqlline.SqlLine$ReflectiveCommandHandler.execute(SqlLine.java:2810)
        at sqlline.SqlLine.dispatch(SqlLine.java:817)
        at sqlline.SqlLine.initArgs(SqlLine.java:633)
        at sqlline.SqlLine.begin(SqlLine.java:680)
        at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441)
        at sqlline.SqlLine.main(SqlLine.java:424)
sqlline version 1.1.2
0: jdbc:phoenix:localhost> !tables
java.lang.IllegalArgumentException: No current connection
        at sqlline.SqlLine.conn(SqlLine.java:461)
        at sqlline.SqlLine$Commands.tables(SqlLine.java:3028)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at sqlline.SqlLine$ReflectiveCommandHandler.execute(SqlLine.java:2810)
        at sqlline.SqlLine.dispatch(SqlLine.java:817)
        at sqlline.SqlLine.begin(SqlLine.java:699)
        at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441)
        at sqlline.SqlLine.main(SqlLine.java:424)



The error, "Unsupported major.minor version 51.0," suggests you attempting to run classes compiled with Java 7 on a Java 6 runtime. Check which JDK you are running, chances are you're picking up the wrong one.



I am on Java 6 
but it looks there is a java 7 that was installed by Cloudera /usr/lib/jvm/java-7-oracle-cloudera/
what do I change to use the java 7


댓글 없음:

댓글 쓰기