Hi arthur,

its not related to hdfs or hbase path.
U need to specify the zookeper quorum

jdbc:phoenix [ :<zookeeper quorum> [ :<port number> ] [ :<root node> ] ]



-Yeshwanth
Can you Imagine what I would do if I could do all I can - Art of War

On Wed, Oct 8, 2014 at 5:42 PM, Arthur.hk.chan@gmail.com <arthur.hk.chan@gmail.com> wrote:
Hi,

I use Hadoop 2.4.1 Cluster and HBase Cluster (0.98.6), my HBASE rootdir  is hdfs://my_cluster/hbase

hbase-site.xml
 <property>
  <name>hbase.rootdir</name>
 </property>

hdfs-site.xml
    <property>
     <name>dfs.nameservices</name>
     <value>my_cluster</value>
     <final>true</final>
    </property>


The hbase shell works well, when I tired Phoenix I got the following error:

./sqlline.py z1:2181,z2:2181,z3:2181:/my_cluster/hbase

Error: ERROR 102 (08001): Malformed connection url. jdbc:phoenix:z1:2181,z2:2181,z3:2181:/my_cluster/hbase (state=08001,code=102)
java.sql.SQLException: ERROR 102 (08001): Malformed connection url. jdbc:phoenix:z1:2181,z2:2181,z3:2181:/my_cluster/hbase
at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:333)
at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:133)
at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver$ConnectionInfo.getMalFormedUrlException(PhoenixEmbeddedDriver.java:183)
at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver$ConnectionInfo.create(PhoenixEmbeddedDriver.java:238)
at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:144)
at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:129)
at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:133)
at sqlline.SqlLine$DatabaseConnection.connect(SqlLine.java:4650)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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

list;
No current connection

Question: What should be the correct connection URL if it is Hadoop2 and in HA Cluster mode?

Regards
Arthur