Re: JDBC Connection URL to Phoenix on Azure HDInsight

2018-11-29 Thread Raghavendra Channarayappa
Thanks Josh for the quick response.

Did some digging, the Zookeeper quorum needs to be used for the thick
client like Josh suggested. JDBL URL was fine and found there were two
issues with Azure HDI setup:

   1. Zookeeper Server was not started
   2. Zookeeper port(2181) is not open

*1.* Zookeeper Server is not automatically started if you are using Azure
HDI, it has to be started by running the below command

 `./usr/hdp/2.xxcx/zookeeper/bin/zkServer.sh start`

The above command starts the Zookeeper server in standalone-mode. If you
need to start the Zookeeper in cluster-mode, you need to add the Zookeeper
Server FQDNs(server.{1..n}) to the ./usr/hdp/2.xxcx/zookeeper/conf/zoo.cfg
file if there are not present already.

maxClientCnxns=50
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/var/lib/zookeeper
clientPort=2181

server.1=zk0-apache.x.tx.internal.cloudapp.net:2888:3888
server.2=zk1-apache.x.tx.internal.cloudapp.net:2888:3888
server.3=zk2-apache.x.tx.internal.cloudapp.net:2888:3888

You need to stop and start the zkServer after the configuration changes. More
info on Zookeeper documentation

.

*2.* Azure HDI Cluster, by default, is created inside a network which
doesn't expose your cluster ports(eg. 2181, 8765) to the public. You need
to have a Virtual Network created as explained in this artcile

and create the HDI cluster inside this network. Through the network, you
will be able to open the desired ports.

On Wed, Nov 28, 2018, 2:54 AM Josh Elser  Are you trying to use the thick driver (direct HBase connection) or the
> thin driver (via Phoenix Query Server)? You're providing examples of both.
>
> If the thick driver: by default, I believe that HDI configures a root
> znode of "/hbase" not "/hbase-unsecure" which would be a problem. You
> need to pass your ZK quorum which makes your 2nd HDI "example"
> nonsensical. You can read the Phoenix home page for information about
> how to construct a Phoenix JDBC URL for the thick driver at
> https://phoenix.apache.org/#connStr
>
> If you are still having troubles, I'd suggest that you clarify exactly
> what you want to do (rather than everything you tried) and include the
> error you ran into.
>
> On 11/27/18 7:54 AM, Raghavendra Channarayappa wrote:
> > Dear all,
> >
> > My current problem is fairly trivial, i guess, but I am currently stuck
> > on this.
> >
> > The following was the JDBC connection string for Phoenix on EMR
> >
> >
> jdbc:phoenix:thin:url=http://ec2-12-345-678-90.ap-southeast-1.compute.amazonaws.com:8765;serialization
> =PROTOBUF;autocommit=true
> >
> > which worked perfectly fine.
> >
> > But, for Phoenix on Azure HDInsight(which uses HDP2.6.0), I am unable to
> > figure out the equivalent JDBC url
> >
> > The following options which *DID NOT* work:
> > *Azure HDInsight Ambari Dashboard URL as the server_url:*
> > jdbc:phoenix:thin:url=http://randomcluterdashboard.
> azurehdinsight.net:8765;serialization=PROTOBUF;autocommit=true
> > *Phoenix Query Servers(comma-separated) as the server_url:*
> > jdbc:phoenix:
> wn0-apache.x.tx.internal.cloudapp.net
> > ,
> wn1-apache.x.tx.internal.cloudapp.net
> > ,
> wn2-apache.x.tx.internal.cloudapp.net
> >  >,wn3-apache.x.tx.internal.cloudapp.net:2181
> :/hbase-unsecure
> > *Zookeeper Quorum(comma-separated) as the server_url:*
> > jdbc:phoenix:
> zk0-apache.x.tx.internal.cloudapp.net
> > ,
> zk1-apache.x.tx.internal.cloudapp.net
> >  >,zk2-apache.x.tx.internal.cloudapp.net:2181
> :/hbase-unsecure
> >
> > Where can I find the JDBC url in Ambari dashboard?
> >
> > Thanks in advance,
> >
> > Raghavendra
> >
> >
> >
> >
>


Re: JDBC Connection URL to Phoenix on Azure HDInsight

2018-11-27 Thread Josh Elser
Are you trying to use the thick driver (direct HBase connection) or the 
thin driver (via Phoenix Query Server)? You're providing examples of both.


If the thick driver: by default, I believe that HDI configures a root 
znode of "/hbase" not "/hbase-unsecure" which would be a problem. You 
need to pass your ZK quorum which makes your 2nd HDI "example" 
nonsensical. You can read the Phoenix home page for information about 
how to construct a Phoenix JDBC URL for the thick driver at 
https://phoenix.apache.org/#connStr


If you are still having troubles, I'd suggest that you clarify exactly 
what you want to do (rather than everything you tried) and include the 
error you ran into.


On 11/27/18 7:54 AM, Raghavendra Channarayappa wrote:

Dear all,

My current problem is fairly trivial, i guess, but I am currently stuck 
on this.


The following was the JDBC connection string for Phoenix on EMR

jdbc:phoenix:thin:url=http://ec2-12-345-678-90.ap-southeast-1.compute.amazonaws.com:8765;serialization=PROTOBUF;autocommit=true

which worked perfectly fine.

But, for Phoenix on Azure HDInsight(which uses HDP2.6.0), I am unable to 
figure out the equivalent JDBC url


The following options which *DID NOT* work:
*Azure HDInsight Ambari Dashboard URL as the server_url:* 
jdbc:phoenix:thin:url=http://randomcluterdashboard.azurehdinsight.net:8765;serialization=PROTOBUF;autocommit=true
*Phoenix Query Servers(comma-separated) as the server_url:* 
jdbc:phoenix:wn0-apache.x.tx.internal.cloudapp.net 
,wn1-apache.x.tx.internal.cloudapp.net 
,wn2-apache.x.tx.internal.cloudapp.net 
,wn3-apache.x.tx.internal.cloudapp.net:2181:/hbase-unsecure
*Zookeeper Quorum(comma-separated) as the server_url:* 
jdbc:phoenix:zk0-apache.x.tx.internal.cloudapp.net 
,zk1-apache.x.tx.internal.cloudapp.net 
,zk2-apache.x.tx.internal.cloudapp.net:2181:/hbase-unsecure


Where can I find the JDBC url in Ambari dashboard?

Thanks in advance,

Raghavendra






Re: JDBC Connection URL to Phoenix on Azure HDInsight

2018-11-27 Thread Raghavendra Channarayappa
+Samya Ghosh 

On Tue, Nov 27, 2018 at 6:24 PM Raghavendra Channarayappa <
raghavendra.channaraya...@myntra.com> wrote:

> Dear all,
>
> My current problem is fairly trivial, i guess, but I am currently stuck on
> this.
>
> The following was the JDBC connection string for Phoenix on EMR
>
> jdbc:phoenix:thin:url=http://ec2-12-345-678-90.ap-southeast-1.compute.amazonaws.com:8765;serialization=PROTOBUF;autocommit=true
>
> which worked perfectly fine.
>
> But, for Phoenix on Azure HDInsight(which uses HDP2.6.0), I am unable to 
> figure out the equivalent JDBC url
>
> The following options which *DID NOT* work:
> *Azure HDInsight Ambari Dashboard URL as the server_url:* 
> jdbc:phoenix:thin:url=http://randomcluterdashboard.azurehdinsight.net:8765;serialization=PROTOBUF;autocommit=true
> *Phoenix Query Servers(comma-separated) as the server_url:* 
> jdbc:phoenix:wn0-apache.x.tx.internal.cloudapp.net,wn1-apache.x.tx.internal.cloudapp.net,wn2-apache.x.tx.internal.cloudapp.net,wn3-apache.x.tx.internal.cloudapp.net:2181:/hbase-unsecure
> *Zookeeper Quorum(comma-separated) as the server_url:* 
> jdbc:phoenix:zk0-apache.x.tx.internal.cloudapp.net,zk1-apache.x.tx.internal.cloudapp.net,zk2-apache.x.tx.internal.cloudapp.net:2181:/hbase-unsecure
>
> Where can  I find the JDBC url in Ambari dashboard?
>
> Thanks in advance,
>
> Raghavendra
>
>
>
>
>